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 and Integration Guide shold answer most of possible questions.
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?”)
QTX does not deal with po/mo as it is mentioned in the description. 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.ww.wp.xz.cn/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?
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.ww.wp.xz.cn/themes/functionality/localization/
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.
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!