Title: Forced language in functions.php
Last modified: August 31, 2016

---

# Forced language in functions.php

 *  [itPro](https://wordpress.org/support/users/ai1dro0knotbot/)
 * (@ai1dro0knotbot)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/forced-language-in-functionsphp/)
 * Hi,
    I’m bulding ajax theme and ran into small issue: I send JS request, intercept
   it with action hook on backend side, generate html content to send, but when 
   I translate it, it comes in default language. How can I force translation to 
   my current language?
 *     ```
       add_action('jx_x25dataflow', function($jx) {
       $page = get_page($pageID);
       $ret = __($page->post_content);
       });
       ```
   
 * [https://wordpress.org/plugins/qtranslate-x/](https://wordpress.org/plugins/qtranslate-x/)

The topic ‘Forced language in functions.php’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/qtranslate-x_f9f9f9.svg)
 * [qTranslate X](https://wordpress.org/plugins/qtranslate-x/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/qtranslate-x/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/qtranslate-x/)
 * [Active Topics](https://wordpress.org/support/plugin/qtranslate-x/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/qtranslate-x/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/qtranslate-x/reviews/)

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)
 * [qTranslateX](https://wordpress.org/support/topic-tag/qtranslatex/)

 * 0 replies
 * 1 participant
 * Last reply from: [itPro](https://wordpress.org/support/users/ai1dro0knotbot/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/forced-language-in-functionsphp/)
 * Status: not resolved