Support » Plugin: Theme and plugin translation for Polylang (TTfP) » Not working on admin (backend) pages

  • Resolved davidreedernst


    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?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author marcinkazmierski


    Thank you for your topic.
    Unfortunately, at the moment the plugin doesn’t have feature to translate admin pages.
    I think I will add this in the future 😉


    Thread Starter davidreedernst


    Thank you for your reply, even if it (obviously) wasn’t the response I was hoping for. 🙂

    As a workaround, I’m considering exporting the translations as a CSV and then converting that to a traditional .po file. Do you see any reason that this approach wouldn’t work? It’s obviously a hassle for me, but I don’t want to have to set up two systems for our translators to use. So if I can still use this plugin to manage the translating, it would probably be worth the export/reformat trouble.

    Thanks again for your reply and for your work on the plugin!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.