Translating your theme is pretty easy with WordPress. Essentially, it involves these 3 steps:
- Update your WordPress to the latest version (atleast v4.3)
- Switch your WordPress language. This takes care of all the default WordPress strings
- Install a plugin like Loco Translate to translate the theme specific strings
Note: You can also use this plugin to translate plugin specific strings!!
Switching WordPress Language
Change your default WordPress language by going to Settings > General. If you do not see the option below, you will need to update your WordPress. If you have translated your site in the past for previous WordPress versions (which used
wp-config.php to init translation), then you will need to remove the translation code from your
Translating Theme Strings
- Install and activate the Loco Translate plugin.
- In your wp-admin, go to Loco Translate > Manage Translations
- Find your active theme and click on New Language
- Select your language in the next screen.
We highly recommend using the global directory to store your translations. This way you wont lose your translations when you update the theme or WordPress.
- When translating, remember to Sync your file the first time. After this, you need to sync the file only when you update the theme.