Locale Problem with Admin User Language Switch
-
I have 2 custom plugins with very little code, where basically everything I do is echoing out localized strings via __() functions, independently from polylang (free version installed on my site, only plugin).
I noticed this weird behavior: My default language is german; locale de_CH. When I change the language of my admin user in the wp admin panel from german to french, my localized plugin admin pages’ static strings are displayed correctly in french. But, when I do some client-server requests on these pages where the server’s response includes strings loaclized in my plugin via __(), the output of the server’s answer defaults back to the root language, so in this example german instead of french. This does not depend upon the selected language, no matter if I change the admin user’s language to spanish, english, whatever, the reply always comes back in german. When I disable polylang, this does not happen, so it has to be related to polylang. Help?
The topic ‘Locale Problem with Admin User Language Switch’ is closed to new replies.