The simplest way to change your WordPress language is to do so on the General Settings page, but keep in mind this will change the language for the front and back ends of your site. Continue to the third section if you only wish to change one.
Log into the WordPress admin. Open the Settings menu, and select General. Scroll down to the bottom until you see the Site Language setting. Select the language you’d like to use from the dropdown menu, and click Save Changes to make the switch.
How to Add a Language to Your WordPress Directory
If you’re not having much luck using the General Settings page, you can try the more complicated solution and add a language to your site’s directory. Click here to open a repository of WordPress files for multiple languages.
These language files are developed by large teams of volunteers, so they’re not always up to date. Scroll down the list until you find the language you wish to install. Make sure it’s compatible with the version of WordPress you’re using. You can see which versions the language files are compatible with by viewing the Version column.
Basically, languages marked green are compatible with the latest version of WordPress, which your site should be running. Languages marked orange or red are outdated. Make sure you backup your site before installing these, though it would be in your best interest to not install them at all.
Make note of the text in the WP Locale column. For example, the Spanish (Mexico) language has a WP Locale code of es_MX. The “es” part is a language code for “español,” and the “MX” part is a country code for Mexico.
Uploading the Language Files to Your Site
Click the language you want to install on your site, and download its files to your computer by using the Download button on its individual page. Extract the ZIP folder on your computer, and open the WordPress folder inside of it.
Open the wp-content folder, and open the Languages folder. Open your site’s root directory through your host (File Manager in cPanel) or an FTP client, such as FileZilla (PC/Mac) or Cyberduck (Mac). Open the wp-content folder in your site’s directory, create a new folder inside of it, and name it “languages”. Open the folder when you’re done.
Go back to the Languages folder you opened on your computer, and upload all of the .mo and .po files to the Languages folder you created in your site’s directory. Refresh your file manager when you’re done.
Activating the Files in Your wp-config.php File
Open your site’s wp-config.php file, and add this line of code to it:
define (‘WPLANG’, ‘es_MX’);
Change “es_MX” to the code you found in the WP Locale column for the language you want to use. Save the file, and refresh your file manager.
Using Different Languages for the Frontend and Backend
If you want to use a different language for the frontend and backend of your site, follow the instructions in the previous section.
Once you’re done, open your site’s wp-content folder followed by the Themes folder followed by your individual theme’s folder, and open the functions.php file inside of it.
Add this filter to it:
add_filter(‘locale’, ‘wpse27056_setLocale’);
function wpse27056_setLocale($locale) {
if ( is_admin() ) {
return ‘en_US’;
}
return $locale;
}
This changes the language displayed in the WordPress admin to the United States’ version of the English language. Use this simple table to find your country’s language and country codes, and replace it with the language you’d like to use.
Hey Brenda, Thanks again for sharing such a nice content. Changing the wordpress language is not a difficult task. You can make changes through your wordpress dashboard. As the default language of wordpress is English. Now you can easily change wordpress language following simple steps (https://www.wpblog.com/changing-wordpress-website-language/)
Is there a way to have WordPress language change with the person logged in?