1. Home
  2. Docs
  3. Blocks by User Role
  4. Translation

Translation

GlotPress

Our WordPress plugins and themes are localized using the GNU gettext framework and are ready for translation. This is the way to translate plugins, themes, and the WordPress core.

All our plugins and themes include an extra language file with the file ending .pot which you can use to translate the plugin or theme. The .pot file is basically a list of all the text strings used throughout the plugin and theme files in English language.

In addition, our plugins and themes include .po and .mo files for different languages. These files are created from the .pot file and contain both the original language, which is English and the translated strings.

Each of the .po and .mo files is named according to their language codes (es_ES.po for Spanish, fr_FR.po for French, and it_IT.po for Italian etc.). The .po files are compiled to binary .mo files, which gives faster access to the strings at run-time. WordPress uses the .mo files to load the language.

For the translation of our plugins and themes, we use GlotPress. GlotPress is a collaborative, web-based software translation tool. Using GlotPress for our translations allows our community of customers to contribute with translations. You can create an account, log in to translate.righthere.com and help with translating projects and suggest corrections.

Blocks by User Role is created for the new React.js based Block Editor (Gutenberg) in WordPress and does not use the .po and .mo file for translation. Gutenberg uses the JED 1.x JSON translation file. WordPress 5.0 introduced the wp-i18n JavaScript package that provides the functions needed to add translatable strings as you would in PHP where you use .po and the compiled .mo file). With GlotPress you can export your translation in JED 1.x JSON.

The syntax of the translation file is bur-en_US-blocks-by-user-role.json. When you download your JED 1.x JSON file from our translation website replace the en_US with your WordPress locale.

Become a Translation Validator

If you have experience with translating you can become a validator for a language. Just provide a bit of information about your experience, and we will get you added as a translation validator on our GlotPress portal.