Home / Articles / WordPress / Adding Different Languages To WordPress

Adding Different Languages To WordPress

We have said this many times before – that WordPress is the most popular content management system. According to a recent survey, it is estimated that over 50% of the top 1 million websites in the world run on the WordPress Content Management System.

The default language in WordPress is English. But a good number of Internet users around the world do not speak English. The non English speaking population is also sizable and WordPress cannot ignore a significant non English speaking viewership. WordPress in other languages is also used widely.

The top 10 languages which are used on WordPress websites:

  1. English 54.2%
  2. Russian 6.0%
  3. German 5.8%
  4. Japanese 5.0%
  5. Spanish 4.8%
  6. French 4.1%
  7. Portuguese 2.6%
  8. Chinese 2.2%
  9. Italian 2.1%
  10. Polish 1.9%

If you want to localize a website (as with what we did at WHSR recently) or be sure that it reaches the target audience in a non English speaking country, you need to have your website in the native language of that place, or at least a translation option into that language. WordPress has the built-in capacity to work with many languages.

Setting Up WP For Different Languages

1. From the WordPress dashboard, open Settings > General.

In the General Settings page, scroll down to find the language setting at the very bottom of the page. In the drop down box you will find many languages. Choose the one that you want and click on it.

1a

Only languages which have been fully translated will appear in this menu. This does not mean that languages that are not listed here cannot be used. A little bit of tweaking is required before you can make WordPress work in languages that are not on the menu.

WordPress for many languages is made possible with the help of volunteers. The gettext system of translation is used here. You have 2 sets of files for each language – po files (Portable Object format file) and mo files (Machine Object file), with po and mo extensions respectively. A main template “po” is used for translating WordPress into a different language. The po files can be used to edit and improve the translation.

You can find out if your language has been translated here. The progress which the translation teams have made is also shown on the page references above. You need to find your language and download it. Unzip the downloaded files.

I'm assuming you know your way around an FTP client to update your site. You can make the changes locally and update them on your server or make the necessary additions directly to your host server.

Now open the WP-Content folder in your WordPress directory  (located within the public_html folder). And here you should find the Language Folder and add the mo file to this folder. Now, you have put your language files in your WordPress Directory. You will have to instruct WordPress to use these files.

Open Wp-config.php file in a text editor and look for define (‘WP LANG’ ‘ ’);

And enter your country code and your language code. For example, for German as spoken in Switzerland, you would fill in ‘de_CH’ with your language and country code.

To find out your country code and language code, you can refer to the gettext manual.  Once you have added this, save the file and upload it to the WordPress root directory. WordPress should right away start displaying in the language you have chosen.

Plugin Solutions for Non-English WordPress Users

If for any reason, you find all the above too much for you, you could try out a plugin called Native Dashboard. Using this plugin, you can select any administrator language in 3 ways.

  • By logging in
  • Dashboard quick switcher
  • User profile setting

Leveraging this plugin, you can also download required language files into your installation and immediately use them on admin pages.

One advantage with this plugin is that you can have multiple languages for your website. This can be real cool if you have multiple authors on your site. You can then allow them to write in their native language. This plugin works with WordPress version 2.7 to 3.61 (has not been updated for over 2 years) and requires write access to your server, which many may not like (due to security concerns).

Now, all these files display of only the admin area of your website in your language. For themes  and plugins, you may need further translation and you can imagine how hard this is going to be, if you pick Arabic. allow The Right to left translation is going to be a real task. The WordPress default themes come with this support, but you may not find it in other third party themes. Many premium themes and even some free ones from third parties now tend to have the RTL feature readily available.

There are other plugins with various functionalities. English WordPress Admin will allow the dashboard to be displayed in English, while the rest of the site may use another language. This is a useful feature for site development at the back-end, while the front end remains in the local language.

With WordPress Language, you simply have to choose the desired language and everything will be altered automatically. Simple! What’s the catch? It will no longer be updated, but WordPress claims that all these features are included in WPML plugin, which is used to build and run multilingual sites.

Photo of author

Article by Vishnu

Keep Reading