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

Translation of theme

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 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_framework-< locale >.po), because you will not lose file after update in such case. Even if you find your language in existed, I recommend to Copy it in new file and save to global folder, old file – delete.

No need to translate all strings. Just translate those which you need on site.

If you use one of child themes, sometimes you can find strings in Child theme localization file instead of Main theme (rehubchild localization file)

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 of files as described above.

Second way of translation is using POEDIT

  1. Download and install POEDIT
  2. Connect to your site and open /rehub/lang/ directory
  3. Download the rehub_framework.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_framework-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_framework.pot file.

Was this article helpful to you? Yes 6 No 1

How can we help?