WordPress comes in many language packs. As of version 4.0, we will be able to choose a translation during installation. But how can we get the translation files later in order to implement a multi-language installation?
WordPress comes in English, unless the installation package was downloaded from a localized page like de.wordpress.org. For addional languages, we have to do some manual work. As of WordPress 4.0, language packs are offered and downloaded during the installation. This tutorial focuses on the manual way for version 3.9.
We can get the current language files from http://translate.wordpress.org. There we can export the desired files in multiple formats. We need the .mo files, the machine objects.
The projects are divided into several sub-projects. http://translate.wordpress.org/projects/wp/dev is our starting point. Here are the current language files. From there we jump into the respective language project. The xx_XX stands for the language identification according to ISO 639-1 or ISO 639-2. For each language, we need four files:
- http://translate.wordpress.org/projects/wp/dev: xx_XX.mo
- http://translate.wordpress.org/projects/wp/dev/admin: admin-xx_XX.mo
- http://translate.wordpress.org/projects/wp/dev/admin/network: admin-network-xx_XX.mo
- http://translate.wordpress.org/projects/wp/dev/cc: continent-cities-xx_XX.mo
The we put these files into the folder /wp-content/languages/. In the wp-config.php we can give the directory a different location by defining the constant WP_LANG_DIR. With the constant WPLANG we can set the default language, which must exactly match the language code. In a multi-site installation, we can now assign that language to each site in the General Settings. Plugins like our Multilingual Press also offer each individual user to use one preferred language in the administration for all sites.
And that’s all. Did it work for you? Which languages do you use and what do you do with them?
About the Author Birgit Olzem
WordPress ist meine Leidenschaft. Als Coach & Trainerin ist es mir wichtig, dass das vermittelte Wissen nachhaltig auch in der Praxis angewendet werden kann. Individuelle Anwenderschulungen für WordPress & Social Media sind meine Spezialität. Sprechen Sie mich an, wenn Sie wissen möchten, wie man das Beste aus WordPress für Ihre Projekte holen kann.
New Plugin: Slack Connector - Connect WordPress, WooCommerce and Slackby Michael Firnkes
Initially we merely wanted to optimize our own Slack-processes. With automated notifications from our MarkettPress shop, the blog and our forums. The resul ...Read more
Role Based Prices for WooCommerce is available again: Different prices for different customer groupsby Michael Firnkes
You want different prices for different customers and users of your online shop? E.g. for subscribers or wholesaler? Or do you need bulk prices? A lot of o ...Read more
Note to our Customers: MarketPress becoming MarketPress GmbHby Michael Firnkes
MarketPress - previously a project of Inpsyde GmbH - is about to become its own company. This is a huge step on our journey of building the first marketpla ...Read more
Inpsyde is the first WordPress.com VIP partner in Germanyby Michael Firnkes
Automattic has given us the title of WordPress.com VIP Service Partner, the first in Germany, Austria and Switzerland. Worldwide, there are only eleven com ...Read more