Title: String Translation
Last modified: August 31, 2016

---

# String Translation

 *  Resolved [jeromeeee](https://wordpress.org/support/users/jeromeeee/)
 * (@jeromeeee)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/string-translation-8/)
 * Hi,
 * My WordPress site is heavily customized but I have added __() for text translation.
 * I am in love with WPGlobus, and was wondering if there’s any way through this
   plugin that I can control the dictionary of translated text from __().
 * Sorry if my question sounded amateurish, but I’m still pretty new with localization.
 * Thanks and looking forward to hearing from you!
 * [https://wordpress.org/plugins/wpglobus/](https://wordpress.org/plugins/wpglobus/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Support [Alex Gor](https://wordpress.org/support/users/alexgff/)
 * (@alexgff)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/string-translation-8/#post-7229605)
 * [@jeromeeee](https://wordpress.org/support/users/jeromeeee/)
    Please, read [http://www.wpglobus.com/documentation/wpglobus-compatibility-with-themes-and-plugins/](http://www.wpglobus.com/documentation/wpglobus-compatibility-with-themes-and-plugins/)
 * [https://codex.wordpress.org/I18n_for_WordPress_Developers#Introduction_to_Gettext](https://codex.wordpress.org/I18n_for_WordPress_Developers#Introduction_to_Gettext)
 *  Thread Starter [jeromeeee](https://wordpress.org/support/users/jeromeeee/)
 * (@jeromeeee)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/string-translation-8/#post-7229779)
 * Hi Alex,
 * Thanks for your reply.
 * I have set up parts of the theme to enable localization, for example:
 * __(‘Max. Price’,’mythemedomain’)
 * My question is, is there any where or any way that I can set the localization
   of the term ‘Max. Price’ to the different languages available on the site? Can
   WPGlobus handle this, or do I have to do the edits in the PO/MO/POT file?
 * Thanks again for your assistance!
 *  Thread Starter [jeromeeee](https://wordpress.org/support/users/jeromeeee/)
 * (@jeromeeee)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/string-translation-8/#post-7229780)
 * Just to add on, the code is placed on code-behind within the theme functions.
   php, and there is no front-end for it.
 *  Plugin Support [Alex Gor](https://wordpress.org/support/users/alexgff/)
 * (@alexgff)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/string-translation-8/#post-7229781)
 * [@jeromeeee](https://wordpress.org/support/users/jeromeeee/)
    1. you can use 
   POEdit for generate PO\MO files and then use load_theme_textdomain() see [http://codex.wordpress.org/Function_Reference/load_theme_textdomain](http://codex.wordpress.org/Function_Reference/load_theme_textdomain)
   2. you can use code to get string in current language
 *     ```
       echo apply_filters( 'the_title', '{:en}Max. Price{:}{:de}Max. Preis{:}' );
       ```
   
 *  Thread Starter [jeromeeee](https://wordpress.org/support/users/jeromeeee/)
 * (@jeromeeee)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/string-translation-8/#post-7229782)
 * Hi Alex,
 * Do I have to do both steps 1 and 2, or are they different methods to approach
   the question?
 * Say for example, I need to localize this code-behind:
 * <span class=”search-label”>’.__(‘Listed In’,’mythemedomain’).'</span>
    <span 
   class=”search-label”>’.__(‘Type’,’mythemedomain’).'</span> <span class=”search-
   label”>’.__(‘Number of Rooms’,’mythemedomain’).'</span>
 * How can I use the apply_filters method to this?
 * Thanks once again, so much, for your help.
 *  Thread Starter [jeromeeee](https://wordpress.org/support/users/jeromeeee/)
 * (@jeromeeee)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/string-translation-8/#post-7229783)
 * I have tried to first method, here’s what I’ve done:
 * 1. Create languages folder /wp-content/themes/mythemename/languages
    2. Put my
   PO/MO files in the folder (zh_CN.mo and zh_CN.po) 3. Added this line of code 
   in my functions.php :
 * > add_action(‘after_setup_theme’, ‘load_languages’);
   >  function load_languages(){
   > load_theme_textdomain(‘mythemedomain’, get_template_directory() . ‘/languages’);}
 * But when I’m on the Chinese version of the site (from WPGlobus), the translations
   do not appear. Any idea?
 *  Plugin Support [Alex Gor](https://wordpress.org/support/users/alexgff/)
 * (@alexgff)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/string-translation-8/#post-7229784)
 * try this in functions.php
 *     ```
       load_theme_textdomain( 'mythemedomain', get_template_directory() . '/languages' );
       ```
   

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘String Translation’ is closed to new replies.

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

 * 7 replies
 * 2 participants
 * Last reply from: [Alex Gor](https://wordpress.org/support/users/alexgff/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/string-translation-8/#post-7229784)
 * Status: resolved