Seems like a simple issue, and I’m guessing I’m missing something kind of obvious, but I would appreciate assistance. I’m developing a custom plugin. The translation strings show up in Languages > String Translations as expected. When I enter translations there, the results are reflected on the front end of the site immediately. However, I need translations on the admin pages as well. I am logged into the site as a user who prefers the alternative language, but the translations aren’t happening there. In a couple of cases I am using the exact same code in a front-end context and a back-end context, and it only works on the front-end. The code is simple:
_e( 'String to translate', 'pluginslug' )
I’m guessing that somehow the admin user’s preferred language doesn’t “flip the switch” for translations to happen, even though the locale is clearly changed (the WordPress menus all appear in the alternative language, for instance). Is there something I need to add to the code to tell it to use the translations stored through this plugin even on admin pages?
- You must be logged in to reply to this topic.