Table of Contents
Some of the texts and paragraphs have been written directly in the blocks. You need to write them in different languages directly in these blocks and not in the .po files.
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
.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.
How to translate Citadela Listing
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.
Citadela Subscriptions is based on WooCommerce subscriptions. In order to translate strings from this bundled code, you need to add it to Loco translate. The easiest way is to use the following configuration XML code.
Please navigate to Loco Translate > Plugins > Citadela Listing. You should see the following screen:
Click on Setup.
Click on Import config from XML and copy & past the following XML code into XML setup text area.
<?xml version="1.0" encoding="utf-8"?> <bundle name="Citadela Listing"> <domain name="citadela-directory"> <project name="Citadela Listing" slug="citadela-directory"> <source> <directory>.</directory> </source> <target> <directory>languages</directory> </target> <template> <file>languages/citadela-directory.pot</file> </template> </project> </domain> <domain name="woocommerce-subscriptions"> <project name="Citadela Subscription" slug="woocommerce-subscriptions"> <source> <directory>.</directory> </source> <target> <directory>plugin/libs/wc-subscriptions/languages</directory> </target> <template> <file>plugin/libs/wc-subscriptions/languages/woocommerce-subscriptions.pot</file> </template> </project> </domain> </bundle>
If you have done everything correctly, you should see the following screen in Overview:
Now you can click New language to start translating Citadela Subscriptions.
How to translate Citadela Pro plugin
The following XML file can be used to automatically configured Citadela Pro plugin:
<?xml version="1.0" encoding="utf-8"?> <bundle name="Citadela Pro"> <domain name="citadela-pro"> <project name="Citadela Pro" slug="citadela-pro"> <source> <directory>.</directory> </source> <target> <directory>assets/languages</directory> </target> <template> <file>languages/citadela-pro.pot</file> </template> </project> <project name="Citadela Pro" slug="citadela-pro"> <source> <directory>.</directory> </source> <target> <directory>languages</directory> </target> <template> <file>assets/languages/citadela-pro.pot</file> </template> </project> </domain> </bundle>
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
.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
– example of file name for German translation of Citadela Theme:
- Plugin translation files would have format
– example of file name for German translation of Citadela Listing plugin:
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