Title: Translating theme
Last modified: August 31, 2016

---

# Translating theme

 *  Resolved [pandafoxxxx](https://wordpress.org/support/users/pandafoxxxx/)
 * (@pandafoxxxx)
 * [10 years ago](https://wordpress.org/support/topic/translating-theme-5/)
 * Hello,
 * I’m making my first big theme for wordpress and i’m still fairly new with php.
   I’m trying to make my theme in multiple languages and already tried the the following
   to do so:
 * Setting the text domain in the style.css and adding `<?php __('title', 'text-
   domain');?>` in my pages. I added in my theme a language folder with the po files
   in the 2 languages that i’m using. en_US.po and nl_NL.po (With the mo files) 
   I added the languages in qtranslatex and tried to switch languages. The website
   switches but the custom fields don’t. I tried to understand the integration guide
   but i’m getting stuck somewhere but I don’t know where? The wordpress wiki isn’t
   any help too sadly and there are barely any turorials online for this plugin.
   If somebody could help so I could understand what I am doing wrong, that would
   be amazing!
 * [https://wordpress.org/plugins/qtranslate-x/](https://wordpress.org/plugins/qtranslate-x/)

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

 *  Plugin Author [John Clause](https://wordpress.org/support/users/johnclause/)
 * (@johnclause)
 * [10 years ago](https://wordpress.org/support/topic/translating-theme-5/#post-7397908)
 * You need to provide a better description how to reproduce the problem. I cannot
   understand how to try to reproduce. Besides, “Setting the text domain in the 
   style.css” does not make sense to me. What do you mean there? “The website switches
   but the custom fields don’t” What do you mean here? front or admin side? which
   custom field, which page, again front or admin? Please, be specific, provide 
   URLs, field names, page titles, etc.
 * Please, choose one problem and describe exactly what people should do to observe
   the same thing as you do.
 * In theory, [FAQ](https://qtranslatexteam.wordpress.com/faq/) and [Integration Guide](https://qtranslatexteam.wordpress.com/integration/)
   shold answer most of possible questions.
 *  Thread Starter [pandafoxxxx](https://wordpress.org/support/users/pandafoxxxx/)
 * (@pandafoxxxx)
 * [10 years ago](https://wordpress.org/support/topic/translating-theme-5/#post-7397923)
 * I’m gonna try to describe it better.
 * Set my text-domain to customtheme in style.css
 *     ```
       /*
       Theme Name: Custom Theme
       <->
       Text Domain: customtheme
       ```
   
 * My homepage (front-page.php):
 *     ```
       <header class="site-header">
           <h1><?php __('Welcome', 'customtheme'); ?></h1>
       </header>
       ```
   
 * Created a po/mo file with the translation of ‘Welcome’ to Dutch and English and
   placed it inside wp-content/themes/customtheme/langauges.
 * I’m new to this and the Integration guide is made for advanced wordpress/php 
   users and beginners can’t make up anything from it. (Only understood from the
   integration guide “How to translate multilingual fields at frontend?”)
 *  Plugin Author [John Clause](https://wordpress.org/support/users/johnclause/)
 * (@johnclause)
 * [10 years ago](https://wordpress.org/support/topic/translating-theme-5/#post-7397962)
 * QTX does not deal with po/mo as it is mentioned in the [description](https://wordpress.org/plugins/qtranslate-x/).
   For your po/mo to work the locales have to match.
 * You do not need po/mo for English, en_US, that is the default from which all 
   other are translated. File for en_US will be ignored, although I personally think
   that they should not ignored it, because sometimes one wants to phrase statements
   differently.
 * But anyway, po/mo framework is documented in WordPress, starting from this doc:
   [https://make.wordpress.org/polyglots/handbook/](https://make.wordpress.org/polyglots/handbook/)
   I hope you can make sense of their documentation.
 * How did you name the po/mo files, for example? It the examples I saw it should
   be “customtheme-nl_NL.po”. Is this how you named them?
 *  Thread Starter [pandafoxxxx](https://wordpress.org/support/users/pandafoxxxx/)
 * (@pandafoxxxx)
 * [10 years ago](https://wordpress.org/support/topic/translating-theme-5/#post-7397977)
 * exactly like that. I’m gonna try to make something out of the (terrible) wordpress
   docs. Thank you 🙂
 * EDIT: For people who need some extra info, this page also helped me A LOT! [https://developer.wordpress.org/themes/functionality/localization/](https://developer.wordpress.org/themes/functionality/localization/)
 *  Plugin Author [John Clause](https://wordpress.org/support/users/johnclause/)
 * (@johnclause)
 * [10 years ago](https://wordpress.org/support/topic/translating-theme-5/#post-7397997)
 * Last note, in order for QTX to switch language correctly the locales en_US and
   nl_NL must be entered in the language properties at pages `/wp-admin/options-
   general.php?page=qtranslate-x&edit=xx` in the field “Locale”. But before playing
   with qtx, make both locales work correctly without qtx, switching them at the
   bottom of the page `/wp-admin/options-general.php`.
 *  Thread Starter [pandafoxxxx](https://wordpress.org/support/users/pandafoxxxx/)
 * (@pandafoxxxx)
 * [10 years ago](https://wordpress.org/support/topic/translating-theme-5/#post-7397998)
 * Yeah all got that. Got it working now! It isn’t that hard afterall but the finding
   how to do it costs more time. WordPress needs a serious update on the docs. Thx
   for the help!

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

The topic ‘Translating theme’ 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/)

 * 6 replies
 * 2 participants
 * Last reply from: [pandafoxxxx](https://wordpress.org/support/users/pandafoxxxx/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/translating-theme-5/#post-7397998)
 * Status: resolved