Translation / Internationalization / Localization

Alex -

For translating theme text strings you can use Wordpress plugin or desktop tool like poEdit. To customize translations of WooCommerce plugin specific pages please follow this refrence.

 

Getting Started with Loco Translate

First you need to install the plugin.

To translate a theme into your language, follow these steps:

  1. Create the global languages directory at wp-content/languages/themes
  2. Ensure this directory writeable by the web server
  3. Find the theme in the list at Loco Translate > Manage Translations
  4. Click + New language and follow the on-screen prompts.

Important: Step 2 above is critical if you don’t want to lose your translations when your theme is updated. Translation files saved inside theme directories will be deleted by WordPress auto-update. The global languages directory is safe, but must be writeable by your web server for Loco Translate to save files in it.

To translate your own theme or plugin for distribution, follow these steps:

  1. Create a languages subdirectory in your plugin or theme's root directory
  2. Ensure this directory writeable by the web server
  3. Find the theme or plugin in the list at Loco Translate > Manage Translations
  4. Click + New language and follow the on-screen prompts.

More information on using the plugin is available here. Beginner's guide can be find here.

 

Getting Started with poEdit

Download and install poEdit
Go to storesmart/languages/baine.pot

The poEdit screen

Open the file in poEdit.
The box labeled(1) is the original message (in English) from the POT file. The box labeled (2) is where you add your translation. Boxes labeled (3) and (4) are used for adding comments about the messages.
These come in handy if you are working with a team of translators and would like to pass around ideas through the PO file.
Go to FileSave as… to save your translations in a PO file.
When you are finished translating, go to FileSave as… again to generate the MO file.
Or you can set your poEdit to always compile a MO file when saving changes by clicking FilePreferences and on the Editor tab check the Automatically compile .mo file on save box.

Where to place your translation files

theme folder/languages/language_COUNTRY.po (e.g. nl_NL.po for dutch)
theme folder/languages/language_COUNTRY.mo (e.g. nl_NL.mo for dutch)

For multilingual support you can use WPML (our theme is fully compatible with the plugin) or other multilingual plugins.

Have more questions? Submit a request

Comments

Powered by Zendesk