Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
First of all, thanks so much for the module.
For now it seems the module works properly.
One kind of glitch I have is the following:
I have admin_menu installed and have the admin language set to English and the default language set to Dutch. What happens is that the admin_menu language keeps switching the language if you go from the admin pages to the other pages.
As you can imagine, this can be quite a bother as I have to keep flushing the admin menu cache to get it to display in English when I go to an admin page again.
Is it possible to prevent this from happening?
Thanks in advance
Comment | File | Size | Author |
---|---|---|---|
#2 | admin_language-provide-hook-to-determine-needed-switch-1038654-2.patch | 3.63 KB | das-peter |
Comments
Comment #1
dgastudio CreditAttribution: dgastudio commentedComment #2
das-peter CreditAttribution: das-peter commentedThe attached patch should fix that.
But there's more - I hope you can use this as well:
hook_admin_language_switch_language
- which allows other modules to define an "area" where the language should be switched - see admin_language.api.phplanguage_list();
insteadlanguage_list('enabled');
. Scenario: "en" is disabled, "en-gb" is used to provide a separate frontend display language, but the backend still can use the default "en" strings.Comment #3
jordanaHey peter,
I'm sorry it took so long to test the patch.
I tested it and it seems to be working. Initially the admin_menu does display in dutch (default language) the first time, but when going to an admin page, the admin_menu language automatically switches to English (admin lang) and stays that way; - testing this in another browser where the browser cache's were cleared did make the admin_menu show up in the admin language right away.
I haven't really tested the other functions yet (the switchable areas), but for now all is well.
Many, many thanks for all your hard work!
Comment #4
muschpusch CreditAttribution: muschpusch commented@das-Peter: the patch doesn't apply anymore. Could you re-roll it please?
Comment #5
wavesailor CreditAttribution: wavesailor commentedI have the same issue.
Is this module still maintained?
Comment #6
mErilainen CreditAttribution: mErilainen commentedThis module seems to work in random ways. The main problem with the menu is that it never has prefixes, so it's trying to go for the default language but then the module does something to use the chosen admin language instead. So I will go to /admin/structure/views from admin_menu, and it will use Finnish (default language) in the edit buttons for example. Adding the en-prefix will show everything in English, which is my admin language.
Comment #7
killua99 CreditAttribution: killua99 commentedRe-roll ?
Comment #8
das-peter CreditAttribution: das-peter commentedI don't think this approach is the right one - I found following "solution" #2022269: Use the core function path_get_admin_paths() to "dynamically" detect administrative paths but hadn't time to write code yet.
Comment #9
AnybodyComment #10
AnybodyI was wrong, they are not related.
Comment #11
alireza.13 CreditAttribution: alireza.13 commentedre roll plz.
Comment #12
achapWhat's the status on this bug? I'm not sure if my situation is the same as the OP but here goes.
Comment #13
Liam Morland