Translations & Multilingual website

Translation of Citadela theme

Citadela theme can be translated directly on WP.org by you. Join the community of translators and help us with Citadela Theme translations. It is already translated into 6 languages. These translations will be available to everybody if you switch the language of your WordPress installation.

How to translate Citadela plugins to your language

All Citadela plugins include the translation .pot file in the ./languages subfolder. Using the .pot file you can translate words from plugin files to your language.

The easiest way to translate the plugin to your language is to use the Loco Translate plugin. You do not need to use Poedit, you do not need to generate .json files. The plugin will do all the work for you. We recommend storing translated .po and .mo files outside of the plugin folder in the default WordPress ./languages folder. That way you will not lose any translations during plugin updates.

The translation is easy and very straightforward. Loco Translate plugin makes all the hard work of generating files for you. Simply click save and all translations are ready to use in seconds.

Loco Translate plugin can be also used to translate Citadela Listing plugin including Subscription functionality:

WordPress is also planning native support for creating and managing multilingual websites. You can read more about their plans in the official WordPress roadmap.

How to create multilingual website with Citadela

You can use the TranslatePress plugin to translate the Citadela website into multiple languages and run a multilingual website. The plugin allows you to translate website content and also the theme’s strings. It works in a bit different way. Translations are made through the front end. When you change already translated text in your native language it will overwrite also that translated text. It means you must translate it again.

Manual WordPress theme translation using PoEdit

Please use this translation method ONLY if you’re professional developer and you know what you are doing.

All Citadela products include the translation .pot file in the ./languages subfolder. Using the .pot file you can translate words from theme or plugin files to your language.

We recommend using Poedit translation editor to translate words from files. The editor allows you to translate words from theme or plugin .php files. After installation, go to preferences of Poedit via menu File > Preferences, and in the Editor tab of options select “Automatically compile .mo file on save” to automatically create a .mo file during saving .po file.

Once your translation is done, Poedit save your translation files with extensions .po and .mo. From the existing .pot file you will create .po and .mo file types:

  • .po file type created from .pot file and you will use this file for all further changes in translation
  • .mo file is created automatically during saving .po file, .mo file is the file which WordPress require to load translation

Names of files are very important to allow WordPress to load your translation.

  • Theme translation files would have format theme-name-{locale_CODE}.po
    – example of file name for German translation of Citadela Theme: citadela-de_DE.po
  • Plugin translation files would have format plugin-name-{locale_CODE}.po
    – example of file name for German translation of Citadela Listing plugin: citadela-directory-de_DE.po

If you are going to edit the .po file and change translations over FTP, download the .po file to your computer and edit the file locally because generated mo file is not uploaded to your server automatically with the saved .po file.

We highly recommend storing your own translation files in the Child Theme to prevent loss of your translation files with the next Theme or Plugin update. If you store translation files outside the theme or plugin folders, you will not lose translation with the next theme or plugin update.

Correct language locale codes can be found on official WordPress pages: https://make.wordpress.org/polyglots/handbook/translating/requesting-a-new-locale/#find-your-language-code

Note please that translation of words from Gutenberg editor (blocks and settings in the editor) require additional action to generate .json translation files from your translated .po files. Blocks and editor settings are based on the javascript, thus make a working translation of these words you need to follow advanced WordPress documentation: https://developer.wordpress.org/block-editor/developers/internationalization/#create-translation-file

For now, WordPress does not offer a user-friendly way to generate .json translation files for words in Javascript files. Creation of these files can be done only using WordPress Command Line Interface (WP CLI).