HUB Elementor - Translating Hub Core Plugin
In this section, you will find the information you need to translate the Hub Core plugin into your language and use it in multi languages. Translating the Hub Core plugin is very similar to translating the Hub theme
IMPORTANT NOTE: To fully translate your website, please remember to translate the Hub theme as well as Hub Core plugin. Discover our articles about Translating Hub theme.
Hub Core Translation Basics
This section will explain where you can find the files needed for translation and what these files are for.
landing-hub-core.pot - A list of all the text strings used in the Hub Core files. These text strings are in the English language and can contain a translation for each text string. This file can be used as a starting point to create your own translations, using e.g. a third party tool like POEdit.
The source file landing-hub-core.pot can be found inside the hub-core > languages. Please see the screenshot.
The Translation Process
Create a new .po file from the hub.pot located in the languages folder, translate all text strings, then save the .po file with your language code and make sure the corresponding .mo is created, which can be read by WordPress. The next subsection will explain this in detail. If you only want to change a string in an included landing-hub-core.pot file, the same steps apply. Or you can use the Loco translate plugin
Either you are setting up an entirely new language file, or you just want to edit hub.pot language files, the steps to take are simple and more or less the same.
The language files can also be used if you only want to translate a small portion of the theme or one specific area. You do not have to translate the entire theme, you can choose what you want to change inside the hub.pot file. This is the preferred method for translation.
How To Edit The .po file With 3rd Party Software
There are different editors out there for the purpose of editing .po and .pot files, but POEdit is easy to use, it is available for all platforms, and it is freeware. To download POEdit, follow this
link.
How To Start A New Language From Scratch
Step 1 - Open the hub.pot in POEdit by selecting 'New from POT/PO file...'. Once it has loaded, you will find all English text strings in the left column called Source Text. Once you add translations, they will show up in the right column under Translation.
Step 2 - Choose the line you want to translate. In the lower right section of the POEdit window, you will find a text area where you can add the correct translation.
Step 3 - When you are done translating all the needed text strings into your desired language, save the file with the theme name and your language code. For example, if you were translating to the Deutsch language, you would save it as de_DE.po. The corresponding .mo file will be auto-created.
After choosing the language, you can start translating straight away.