PHPMatters Help You Better Hosting Your PHP-based Sites
How to Change WordPress Language

How to Change WordPress Language

The WordPress website is displayed in US English by default, so for people who are not English speakers or whose target readers cannot understand English may want to change WordPress language to their local language. In this case, we’d like to introduce some methods helping you do this easily – both manually and via a special plugin.

Change WordPress Language Manually

For WordPress v4.0 or above

If your current WordPress version is 4.0 or above, then the changing of WordPress language can be easy. You only need to log into your WordPress admin and navigate to the Settings > General. At the bottom location of this page, you can find a Site Language setting. Here, simply choose your target language from the drop-down list and save changes. Thus, both your WordPress admin and website front-end can be changed using your preferred language.

Site Language

However, there are only 56 languages available in this list, so you might fail to find your target option. In this case, you need to download a .mo language file and upload it to a special language folder.

For the file downloading, you firstly need to find your target language from this page. After clicking that language option, you can find an “All Project” button at the bottom of the next page.

All Project

Now, you need to choose WordPress and its version from the project list. Then, you should choose your preferred language again and click the Export button from the following page.

Export Language File

Here, you may find that your download file is a “Po” file. Under this situation, you need to convert it to a “Mo” file using Poedit tool.

Once done, you can dig into your /wp-content/ directory and create a special folder named as /wp-content/languages. Then, simply upload your “Mo file” into that folder and go back to your Site Language setting to change your WordPress language.

For WordPress v3.9 or below

If you are using WordPress lower than v3.9, you need to use the coding stuff to change the language. Firstly, as we have introduced above, you need to upload the “MO” file for your target language into the language folder.

Then, edit your wp-config.php file to add the following line. Here, the “aa” refers to the language code while the “BB” refers to the country code. You can find the related code from this page.

define ('WPLANG', 'aa_BB');

Change WordPress Language Using Plugin

Here, we highly recommend the WordPress Language Plugin. After installing it, you can get a language switcher at your WordPress admin. Then, simply choose your preferred language from the drop-down list and click the Switch Language button from the pop-up window.

WordPress Language Plugin

Use Different Languages for WordPress Fontend and Backend

Sometimes, you may want to use one language for your frontend and another for your dashboard. In this case, the WordPress Language Plugin is really helpful. You only need to check the box of “Use different languages for WordPress admin and public pages”, and then, pick the right languages for the two options respectively.

Use Different Languages for WordPress Fontend and Backend

If you haven’t installed this plugin, you can also do this manually via some coding stuff. For instance, you want to remain your dashboard being displayed using English and your public pages being showed using German. In this case, you can firstly change the whole WordPress language to German, and then add the following code into your functions.php file. (The coding is found from this forum thread.)

add_filter('locale', 'setLocale');
function setLocale($locale) 
{
    if (is_admin())
    {
        return 'en_US';
    }

    return $locale;
}

Use Different Languages for Multiple WordPress Users

In some cases, you may have multiple users and authors who contribute to your WordPress site. Therefore, you may want them to be able to use their own local languages to manage the website. Here, you can use the WP Native Dashboard plugin.

Upon installation, you can go to Settings > Native Dashboard. Then, you need to click the third box as we have done in the following.

Extend Personal Profile Settings

In this case, all the website contributors can go to Users > Your Profile to pick their preferred language that can be used in the WordPress admin.

Also, you can choose to add a language drop-down list on the login screen, so that different people can use different language to log into your WordPress dashboard.

Profile Language