While English is the default language for many websites, there are plenty other for which it’s not.
Yes, believe it or not, some people manage just fine without English 😉
Until now, WPML gave these folks a hard time and made String Translation almost impossible for them. This developers release offers a fix.
WPML’s String Translation Versus .mo Files
WPML includes an interface for translating strings. Strings are anything that doesn’t belong to a specific post or taxonomy (tags, categories, etc.).
For example, texts in the theme are strings. The blog title, tagline and text widgets are strings too.
The difference is between theme texts and admin-entered texts is that theme texts are static and admin texts are dynamic. If you’re using .mo files, you can only translate static texts. WPML’s String Translation allows translating both.
WPML made an unfortunate assumption that all the site’s strings are entered in the default language. There was good reasoning for this assumption, but it made translation for static texts impossible, when these texts are not in English.
So, if you have a site in French and you’re translating to German, none of your contents are in English. Except the texts in the theme and all plugins.
That’s where the problem is.
Since WPML assumed that strings are in French already, it didn’t allow you to enter translation to French.
Explicitly Specifying Strings Language
Now, WPML no longer assumes anything. You can choose the original language of strings.
English is the default language for strings and only very rarely should you change it.
All the texts in WordPress itself, any plugin you download and 99% of the themes is written in English. In order to get them translated, you’ll need to keep English as the language for strings.
To choose the language of the strings in your site, go to WPML->String translation. Scroll down to where it says Translate general settings texts. Then, change the language and click on Save.
New Gotcha – How To Translate Admin Strings
If you’re listening to a podcast or reading news, you better close them. This part requires 100% of your concentration. It’s tricky, confusing and working.
A quick recap:
- All string have the same ‘from language’.
- Your theme’s texts are in English.
- Admin texts (like tagline and text widgets) are translated like theme texts.
The outcome is that if you want to use WPML’s String Translation to translate admin strings, they have to be in English.
That’s right. Even if your site is in French and you’re translating to German and there’s no English involved.
You will enter the admin texts in English (just like texts in the theme). Then, translate them using WPML’s string translation to both French and German.
We realize this is extra work for everyone, but that’s the way it’s working. The String Translation mechanism is an extension of GetText. It translates from one language to others. And, if that one language is English, it’s English everywhere.
We managed to track down the problem and fix it thanks to one of you folks who purchased a support subscription. It took a lot of time to debug and fix and we couldn’t have spent the resources for it without that extra push.