1. Home
  2. ReHub Theme
  3. Theme Install, update, translation
  4. Translation of theme

Translation of theme

First of all, go to Settings – general and set language of your site.

Please, note, that there are some ready translations for theme. But, you must update them before you use them on site.

All of our Themes are able to be translated into any language. The following instructions are given as guidance. You have two ways to translate theme.

Loco Translation

Loco translate plugin (recommended)

Upload plugin Loco translate, now you can translate your plugins from admin panel. For this, open plugin page. Go to  Loco translate   Themes . You can see here all themes. Click on Rehub Theme. Then Click on  New Language . Save your file in Other Locations (/languages/themes/rehub-theme-< locale >.po), because you will not lose file after update in such case.

There are some ready files in theme, you can use them also without creation of new language. But before using them, move them also in system folder

After moving file, click to Edit it and Click on Sync button

No need to translate all strings. Just translate those which you need on-site. We will be also happy if you provide us copy of your PO and MO files after you add more translation to file. You can download them in right corner

How to update translation

After new theme update, go to Theme localizations. Click on  Edit template .

Then, click on  Sync button , then save. Then, return to your localization file and also click on  Sync button  button and save. Now, new strings will be added from new theme

Why some strings are not available in localization file?

Sometimes you can find one common problem – some strings are not available in your localization file.

To fix this, go to Loco Translate – Settings and find option Skip PHP files larger than. Set value as 300k, save. Then, make synchronization (update of your localization file) as described above.

Where is Localization for Admin pages

You can find them in Rehub Framework plugin. Overall process for localization of plugins is the same as for theme

POEDIT program

Second way of translation is using POEDIT

  1. Download and install POEDIT
  2. Connect to your site and open /rehub/lang/ directory or simpy download theme files and open this folder from computer
  3. Download the rehub-theme.pot file and open it with POEDIT.
  4. Translate file and save it as your language string. Example, french – fr_FR.po, danish – da_DK.
  5. Two files will be generated after saving, with .PO and .MO extensions.
  6. Rename and Upload the .MO and .PO files into /wp-content/languages/themes/rehub-theme-locale.po. Use your locale name instead of “locale” suffix in name.

To update localization – Open POEDITOR, open your .PO file and click on “update from .POT file”, then open theme /folder/lang/ folder and choose rehub-theme.pot file.

How to change text if your language is English

Many of buyers ask me how to change some words in theme if they have the same default language as theme. Secret is that you can change it with the same way as translation theme. You just need to create English language localization as described above for Loco translation plugin. So, just create new language and choose English. There are also GB and USA English, you can find which of them is in use on your site in Settings – general