How to translate the theme to some other language?

Note: If you’re using WordPress 4.0 or higher (if not, we recommend that you update) then you do not need to edit the wp-config.php file and you only need to select your language by setting Site Language option in Settings -> General.

VIDEO TUTORIAL IS AVAILABLE ON OUR YOUTUBE CHANNEL!

All our WordPress themes are translation ready which means that you can easily translate them to any language you need. Here are some instructions:

First you need to change your entire language of WP installation to your language. This can be done in file wp-config.php in the root of your WP installation. The constant WPLANG should have the value of locale for your language, you can find the list with WordPress locales here. Then in wp-admin updates you will notice that you can update the WP in your language.

WordPress doesn't include the WPLANG constant in wp-config.php file since WP 4.0. Anyway, just to switch the language you can add it manually.

Find a line
define('WP_DEBUG', false);
and add this line right below it:
define('WPLANG', '<your locale code here>');

Second, navigate to the folder of the theme (wp-content/themes/<our theme name, ie. hairpress or carpress>/) and in the folder languages/ (of the theme) you will find file <name of the theme>.pot. Load this file (as the catalog) in the PoEdit and start translating. When done, save the .po file in the folder translations (there are sl_SI.po and sl_SI.mo files already there as an example) and name it the same as the defined WPLANG constant in the file wp-config.php.
.mo file will be automatically created next to the .po file.

And that's it, your translations should work now.

When you translate the theme to any new language, you can share the po/mo files with the rest of the community. Don't be silly, please send us a .po file, we will include it in the next theme update.

By doing so, you get a big THANK YOU from us - we make your name immortal in the wall of fame on the theme item page on ThemeForest, with a link to your profile/blog/website.

If is you find this method too complex, you can always use CODESTYLING LOCALIZATION PLUGIN, which helps you with a quick and smooth translation. This plugin is completely free and very easy to use it.

Here is another great tutorial from WPZOOM.

If you placed the translation files directly in the folder <name of the theme>/languages/, they will be lost if you update the theme later on and you will have to put the .po/.mo files again in the same folder after update. Alternative is that you use the child theme.

References:

Have more questions? Submit a request

Comments

  • Avatar
    Vitaly Tal Zeitlin

    Hello,
    With your hairpress wordpress and WMPL plugins, I build multi language site (En (default language), Fr, Ru, He).
    I have a critical problem.The Drop Down Language switcher does not work.

    Problem Description: In the site's main menu, all the using languages orders in column and they are visible.

    Expected Result: In the site's main menu, all the using languages will be orders by Drop Down Menu and only presented site language will be visible.

    For see the problem, please open the site:
    Site: http://beautyart.co.il

    Please help me
    Tal Tzeytlin

  • Avatar
    Primoz Cigler

    Hi,

    This was fixed in the latest update to v4.3.1.

  • Avatar
    Vitaly Tal Zeitlin

    Hi,
    First - thank for updating
    Now, after update I have other problems.
    I can not translate a few widgets of the theme:
    Appearance-->Widgets
    1. In "Home page under dark stripe"
    1.1. About Us // Our interesting story ( the text body (text block 1 / 2 /3 is not in WMPL translation string and I don't know how I can translate it)
    1.2. About Us // Our interesting story - The link (button -"Read All"), is not in WMPL translation string and I don't know how I can translate it

    1. In "Home above dark stripe"
      2.1. Latest News // What is going on - The link (button -"View All"), is not in WMPL translation string and I don't know how I can translate it

    2. In "Above Slider" and "Contact page Side Bar"
      3.1. Opening Time. I translated all strings (week's days to - ru, fr, he) but the translating is not appear.(The title "Openig Time" is translate correctly and appears in all language

    Appearance-->Theme Options-->General->"Featured page in the main menu" -> Select "Make an Appointment"
    1. The "Make an Appointment" button cannot be translated, is not in WMPL translation string and I don't know how I can translate it. In all languages the button links to Appointment page in english and not to current language. I dont know where can I edit links.

    Please help me
    Thank you
    Have a nice day

  • Avatar
    Primoz Cigler

    Hi,

    Answered in your ticket, but a reference for all others: the WPML doesn't handle the widgets content translations, so the trick is to use the widget visibility plugin, as suggested here: http://wpml.org/forums/topic/translate-widgets/

  • Avatar
    Dominique de Coster

    Hi,

    I can see that some people allready translated your Haipress theme in Fench.

    Can you tell me how I can spear translation time of the all language file in French by getting one fr_FR.po ready?

    Mank thanks,

    Dominqiue

  • Avatar
    Primoz Cigler

    Hi,

    Nobody sent us a French translation yet. So you should content these people yourself if they are prepared to send you a translation.

  • Avatar
    Mrodriguezj

    Hi,

    The Organique theme pot file does not have the "Enter your search keyword" string for translation.

    Should that be found somewhere else?

    Thanks!

  • Avatar
    Primoz Cigler

    It has, but was added in one of the latest updates. Which version do you have? Latest is v1.7.1

  • Avatar
    Mrodriguezj

    Oh, that might by why. I have the 1.5.0. Do i have to update the whole Theme or just the lang files?

  • Avatar
    Primoz Cigler

    Hi, you have to update the lang files and at least also header.php. Here is the list of files modified from v1.5.0 to latest:

    M archive.php
    M assets/js/admin.js
    M assets/lib/components/products.scss
    M assets/lib/components/
    wp.scss
    M assets/stylesheets/main.css
    M front-template-slider-no-captions.php
    M front-template-slider.php
    M front-template.php
    M header.php
    M inc/helpers.php
    M inc/ot-meta-boxes.php
    M inc/template-tags.php
    M inc/tgm-plugin-activation.php
    M inc/theme-customizer.php
    M inc/widgets/widget-shop-category-filter.php
    M inc/widgets/widget-testimonials.php
    M inc/widgets/widget-title-with-icon.php
    M index.php
    A languages/nlNL.mo
    A languages/nl
    NL.po
    M languages/organique.pot
    M search.php
    M style.css
    M woocommerce/loop/pagination.php
    M woocommerce/single-product/add-to-cart/simple.php

  • Avatar
    Cosette Malinowski

    To efficiently translate the strings of a WordPress theme, I recommend using this online localization management platform: https://poeditor.com
    You can use it with this plugin to automate the translation process more: http://wordpress.org/extend/plugins/poeditor/

Please sign in to leave a comment.