Location of Theme Language Files
By default, Salient will load language files from the lang directory, which is located in the root of the theme folder. Once you’ve created your .po/.mo files for your desired language code, you can store them in this directory.
If you’d like to keep your .po/.mo files in a child theme to ensure they don’t get removed during theme updates, you can create a directory called “lang” within your Salient child theme and keep them there instead. When going this route, you’ll also need to add the following snippet into your Salient child theme functions.php file:
Salient includes three files in the lang directory to assist with translation.
- default.po/default.mo – language files with no assigned language that can be opened in a program/through a plugin of your choosing to quickly start editing the strings. Once the translations have been made, simply rename both files to the WordPress locale you’re using. For example French would named “fr_FR.po” and “fr_FR.mo”. You can find a complete list of locale codes here.
- nectar_salient_strings.pot – This is the main template file that can be used to generate new po/mo files. It has all the translation strings left empty. When you use one of the recommended tools for translating listed below, you can use this file to automatically create the .po/.mo files in your chosen locale so you don’t need to manually name them or find out what your locale code is.
WPML makes it easy to build multilingual sites and run them. It’s powerful enough for corporate sites, yet simple for blogs.
- Translate pages, posts, custom types, taxonomy, menus and theme’s texts.
- WPML comes with state-of-the-art translation management. You can turn ordinary WordPress users into Translators. Translators can access only specific translation jobs which Editors assign to them.
- WPML frees you from the hassle of editing PO files and uploading MO files. You can translate texts in other plugins and in Admin screens directly from the String Translation interface.
The WPML team has written a comprehensive guide on integration with Salient. If you’re new to the plugin, or stuck on something we recommend giving it a read through.
Loco Translate (Free)
Loco Translate provides in-browser editing of WordPress translation files.
- Built-in translation editor within WordPress admin
- Extraction of translatable strings from your source code
- Native MO file compilation without the need for Gettext on your system
Poedit is a program you can download for free to translate outside of WordPress. Because of this, it’s slightly more labor intensive than one of the WP plugins above, but still a great option. Poedit is intentionally spartan so that the focus is on the translation you’re working on. Just you and the translation, no distractions.