Title: Admin User Language Switch + Polylang Problem
Last modified: August 14, 2021

---

# Admin User Language Switch + Polylang Problem

 *  [joeyojoeyo12](https://wordpress.org/support/users/joeyojoeyo12/)
 * (@joeyojoeyo12)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/admin-user-language-switch-polylang-problem/)
 * I’ll try to be more precise than in my first question:
 * What I’ve done: Developed a custom plugin, let’s say `my-plugin`, for which I’ve
   created its translations, for example in french, via the usual approach using
   a `my-plugin-fr_FR.mo` file. Via this plugin, I’ve also coded a custom admin 
   page Y, let’s say one with this content:
 *     ```
       <p><?php _e( 'Welcome', 'my-plugin' ); ?></p>
       <button><?php _e( 'Request', 'my-plugin' ); ?></p>
       ```
   
 * The request button is used to trigger a request to the server, which should answer
   like this when requested:
 * `<?php _e( 'Hello there dear client!', 'my-plugin' ); ?>`
 * I won’t specify the details of the request; it’s standard wp ajax.
 * Now, while in the wp admin, I change the current admin user’s language via users-
   > edit -> language to french. Then I go back to the custom admin page Y, and 
   I find the “Welcome” and “Request” words properly translated in french. But, 
   when I click on “Request” to trigger the above-mentioned request, I get ‘Hello
   there dear client!’ as an answer, instead of its french translation. When I disable
   polylang, I correctly get its french version as the server’s response, so this
   has to do with polylang. I’m using the free Polylang V. 3.1 (most recent), and
   the WP version 5.8. This never happened before, so I guess it must be related
   to the most recent udpate(s). The above-described applies to all of my server-
   client requests of my backend; I have to get rid of this problem ASAP..
 * Also, please note that Polylang is the only plugin of my website, in addition
   to my two additional custom plugins (I’m a professional developer).
    -  This topic was modified 4 years, 9 months ago by [joeyojoeyo12](https://wordpress.org/support/users/joeyojoeyo12/).

The topic ‘Admin User Language Switch + Polylang Problem’ is closed to new replies.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

## Tags

 * [admin](https://wordpress.org/support/topic-tag/admin/)
 * [locale](https://wordpress.org/support/topic-tag/locale/)
 * [wp-admin](https://wordpress.org/support/topic-tag/wp-admin/)

 * 0 replies
 * 1 participant
 * Last reply from: [joeyojoeyo12](https://wordpress.org/support/users/joeyojoeyo12/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/admin-user-language-switch-polylang-problem/)
 * Status: not resolved