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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dgastudio’s picture

das-peter’s picture

The attached patch should fix that.
But there's more - I hope you can use this as well:

  • Introduced hook_admin_language_switch_language - which allows other modules to define an "area" where the language should be switched - see admin_language.api.php
  • Use language_list(); instead language_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.
  • Added the translation forms to the node section.
jordana’s picture

Hey 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!

muschpusch’s picture

@das-Peter: the patch doesn't apply anymore. Could you re-roll it please?

wavesailor’s picture

I have the same issue.
Is this module still maintained?

mErilainen’s picture

This 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.

killua99’s picture

Re-roll ?

das-peter’s picture

I 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.

Anybody’s picture

Anybody’s picture

alireza.13’s picture

re roll plz.

achap’s picture

What's the status on this bug? I'm not sure if my situation is the same as the OP but here goes.

  • My administration language is English.
  • I switch the code on the front end to English using the language switcher bloc
  • Then I go to the admin pages and it appends zh-hant/ to the url (which is Chinese). But step 1 should mean my language is in English
  • If I switch back to the front end, my site is now in Chinese
Liam Morland’s picture

Status: Needs review » Needs work