How to translate Travelify and Pinbin WordPress themes

There are over 6800 spoken languages in the world and currently our Travelify theme uses one – English is translated in English, French, German, Hungarian, Italian, Spanish, Dutch, Hebrew, Slovak, Turkish, Swedish, Brazilian Portuguese, Polish, Finnish and Chinese. However, this theme is built they way that you can translate it with ease. We have already added default “.pot” WordPress language files and you can start translation from there.

Please note! This tutorial will apply on most WordPress themes that are translation ready and not just Travelify or Pinbin so feel free to read further even if you are not using our themes.

How to translate any WordPress Theme?

1. First of all you will need to download .PO/.pot file editor like Poedit or other. It is possible to use any text editor but it will be so much easier to use Poedit than regular text edit so I strongly recommend to download it. It’s free, works on Mac, Windows and Linux and there is no reason not to use it.

Translate theme using Poedit

2.  Second thing is to open default language files form your theme. In Travelify case it is located in languages folder inside theme folder. This file is called travelify.po. You should use this default file for translation but you need to create a new file when you are done. Most themes has the same structure and language files should be somewhere inside theme folder. There is chance that your theme is not ready for translation so it might take time to modify. If you are not developer it might be a pain to create translation support for theme.

Theme .pot file for translation

 

3. Now in the Poedit click on original text one by one and write your translation underneath. Just like you can see iu the screenshot below. It will take some time to get through all of them so be patient. If you think that some translations you won’t need you can leave them as they are in the original language.

Poedit string translation

4. Now the most important part. When you are saving your file in theme language folder you should use proper language code. For instance if you have translated WordPress theme to German you should use “de_DE.po” as file name and “fr_FR.po” for French. This will make sure that WordPress understands what language you are referring to. For other languages codes please see this documentation.

Please note: Default language file extension is .pot (travelify.pot, sparkling.pot, dazzling.pot etc) but you have to use .po in order to make your translation work. Also Poedit application will create .mo and it needs to be included in languages folder as well.

 

Proper translation file naming

5. Now WordPress will use theme language the same as your WordPress language. If your WordPress dashboard uses French, don’t expect for theme to show German. Changing WordPress language will automatically change theme language if it is available in the theme language folder under proper name we discussed in Step 4.

6. Changing WordPress language is as easy as adding

define ('WPLANG', 'fr_FR');

to the wp-config.php file located at your WordPress installation root folder. You can download WP language files or entire WordPress installation in your language from here.

Update: As of WordPress 4.0 you can now choose WordPress language when you install WordPress itself. Afterwards you will get a new option under Settings – General where you will be able to switch to any language. See screenshot below:

WordPress Language switcher

 

If you installed WordPress before WordPress 4.0 become available you will still have to define language via wp-config.php but afterwards you will get notification in your WordPress dashboard that it is no longer required to define language via configurations file but you have to initialize it once.

If you have translated Travelify, Pinbin or other our WordPress themes you can send me “.po” language files and I will add them to default theme installation. I will feature your name on theme itself as well as I will give credit on this website. I really appreciate your support and will say a proper thank you! :)

If you have any questions regarding WordPress theme translation or any question related to our WordPress themes please don’t hesitate and leave your questions in comments below.

Update (1):

We have created a special page for our contributors!. We try to keep that page updated once more translations are available. We would really appreciate if you could contribute to make our themes even better!

Update (2):

We have updated this guide to include information about WordPress 4.0 which makes it easier to use WordPress in your own language.

Aigars

Frontend web developer and web designer specialized in free and premium WordPress theme development. Started to learn to code in early 2014 and now I am familiar with CSS/HTML/JavaScript (jQuery). Obsessed with application performance, user experience and simplicity.

This Post Has 62 Comments

  1. Hi Aigars,
    Thanks for your tuto, i did a translation file for french language. I succeed in installing it onto my site, but i realize that somme texts didn’t change/appear in the po file.
    I can provide you my version, feel free to contact me by mail.

  2. Hi Aigars

    Thanks for you great job, I love this theme and I’ve translated it into Chinese, I worked on 1.3.0 and I noticed there is one line missing in the original po file so the corresponding sentence keeps unchanged, wish you could fix it, the detail:

    Featured Slider -> How to use the featured slider?
    Create Post or Page and add featured image to it.

    I’m glad to translate the theme and I’m willing to share my work, you could email me to have the translated po file if you wish. :-)

  3. Well, I’ve got it.

    It seems that the theme file theme-options.php lacks of a on line 413. Now it works if I add this and add the corresponding msgid/msgstr in the po file
    With this could help :)

      1. I found this error and updated Theme Options as well as original .po file. This will be added on the next theme update.
        Thank you for pointing that out!

  4. Hello Aigars,
    Thanks for this Theme! It is fun to use.
    So, I quickly translated it to Hungarian.
    How may I send to po file to you?

    Greetings,

    Tamás from Budapest, Hungary

  5. Tamas,

    Thank you for your contribution! Really appreciate it.

    Will add Hungarian translation to the next theme update. And of course I will add you to list of contributors.

    You can reach me via support[at]divilab.com.

    Btw, Awesome use of Travelify theme! :)

  6. Hello Aigars,

    I really liked Travelify theme and I’m translating it to Brazilian Portuguese.
    Are you interested to make this translation avaliable for everyone?

    Sincerely,

    Guilherme Santos

  7. Guilherme,

    That would be awesome!

    Please send me your translation when ready to support[at]divilab.com

    Thank you! I highly appreciate your effort!

  8. Hi Aigars! I’m bilingual Spanish/Italian and have translated to both languages. I will send the files to your email so you can make them available for everybody. I’m glad to say I’m not a programmer, just a beginner using WP, but the task was quite easy by following the step by step guide you provided. You’ve done an excellent job!

    1. Marion,

      This is so awesome! Can’t thank you enough for your contribution!

      Will add Italian and Spanish translations to the next theme version.

      Thank you!

    1. Awesome! :)

      Please send me translation to suppport[at]divilab.com and I will respond to you ASAP.

      I will look into RTL formating when I will receive your translation because right now I don’t have any samples for testing.

    1. Daniel,

      Romanian language would be great!

      You can send translation files to support[at]divilab.com.

      Read more buttons translation are inside the same default travelify.po file. You just need to create a new file called ro_RO.po based on default language file.
      Let me know if you face any problems with translation.

    1. I received your translation and everything looks smooth! Thank you!

      I will add it to the next theme update.

      Thank you for your incredible contribution!

      1. Hi, I’m planning on doing a webshop USING your theme. I love the fact it’s free. If I’ll make some money I will definitely donate something. Thanks dude!

  9. I suggest you use poeditor.com for translating wordpress themes. It has tons of benefits, translators can work collaboratively in many languages and it supports pot, po, xls, xlsx, strings, xml, resx and properties files.

    1. Héctor,

      Please forward it to support[at]divilab.com and will continue discussion there.

      Thank you for your amazing contribution! I really appreciate it!

  10. I have translated Dazzling 1.2 to Polish language. It seems, that it works fine 😉 How can I translate Dazzling popular posts plugin too?

    1. Thank you for pointing this out! I see that these strings are missing from default translation files. I have already updated it and pushed to WordPress and Github.

      https://github.com/puikinsh/Dazzling
      http://wordpress.org/themes/dazzling/developers/

      Soon proper translation file will be available via automated update as well.

      Have you noticed that there are some other missing strings to translate?

      I would really appreciate if you could send translation files as well, so I can add them to theme installation.

      Thank you for your effort! I really appreciate it!

  11. I have translated about 50 % of the language file to swedish but I can´t figure out why it doesn´t seem to work. The file is named sv-SE.po and wordpress is set to show swedish. Most of the the text in the backend is swedish. Any ideas about what´s wrong?

    I can send you the translation I´ve done this far.

      1. Poedit created a file with the ending .mo and this file is also uploade to my site, in the same folder as the translation.

        I use the Travelify theme.

  12. Hi! I want to use Dazzling theme with a bilingual page. I’m using mqTranslate and everything works fine besides the theme – it won’t show in Polish. I uploaded Polish translation into /dazzling/languages (both .pl and .mo files) and set define(‘WPLANG’, ‘pl_PL’); but the theme does not want to switch to Polish (all the other things (posts/titles/menus) with language tags work perfectly). Any hints why?

  13. Hi. I’ve been translating the pinbin theme into Finnish, and I’m using the Polylang plugin to translate the site I’m building. I’ve changed and added a few extra translatable strings into a child theme, but I can’t get the comments section to translate, nor have I found where to turn the strings translatable either. Basically, what I mean is that I can’t get strings like “[commenter] says”, “Logged in as”, or, for example, the post comment button to translate. Everything else is working great, but this bugs me. Any tips on how to achieve this?

    1. Hi,

      Pinbin theme needs some major overhaul and hopefully I will get my hands on it within few weeks. Your mentioned parts of currently are not possible to be translated via .po file.

      This was my first WordPress theme I ever created and there are many rough edges that needs to be polished and I am committed to do so.

      I will keep you posted.

      Sorry for my inconvenience.

        1. Damian,

          Thank you for your feedback! I really appreciate it! :)

          And thanks for keeping an eye on this post as you are always first to answer ever question that users have.

  14. Dear,
    Can I have my blog on travelify in two languages? exp English and Spanish at the same time so I can target both groups of readers?

    1. Robert,

      Travelify theme is compatible with WPML multilingual plugin (we have an official certificate from them) which means that you can translate your theme in as many languages as you want and use them side by side. You can find more about this plugin here.

  15. Problem with translation.

    I want translate “One thought on” (Its about comments under posts and etc)

    I have fields:
    single: One thought on “%2$s”
    plural: %1$s thoughts on “%2$s”

    When i try to replace phrases in englesh to Russia and enter “Save” i have trouble window – a format specification for argument 1 doesnt exist in ‘msgstr[0]’.

    How i can solve this problem? Please type the solution.

  16. Sergey,

    Things such as %2$s and %1$s should be left in place when you create translation or otherwise it won’t work. I am not sure about this exact error, but please confirm that you didn’t remove these strings when you tried to translate theme.

      1. I don’t speak Russian, so I can’t provide you with exact answer but the basic idea is like this:
        russian-translation

        You keep those special characters and strings in place with no spaces (just like in original English example), so WordPress can understand what it should do. On my example above you can see that I only translated those stings and left everything else in place, however you can move “%2$s” anywhere in your sentence but it must be there and should look exactly like that with no spaces.

        Let me know if this helps. Also which theme you are trying to translate?

  17. Hello Aigars,
    Maybe you could help me to find a theme. I am looking for a theme on which the users can post their articles and after posting a piece of their article and the user avatar including except of author bio are shown on the frontpage.
    example: shere2.com.

    Could you please guide me to find and buy such a theme?
    Thanks alot in advance,

    David Nabi

    1. David,

      There is no such theme that does this by default. There are some themes that offers a tiny gravatar images in the corner of posts but those themes are not exactly what you are looking for.

      However, there is a tiny trick that you can use to get gravatar (avatar images pulled from gravatar service). For that you can use get_avatar function. You can read more about it here.

      See how avatar is used inside author bio on for our Sparkling theme (check author box bellow article).

      To output this simple image we are using function that you can see here. Number 60 stands for image size in pixels and you can pull larger images from Gravatar service as well.
      Instead of using this function to output author avatar in author bio you can output by replacing featured images. This is a simple copy/paste job so no technical knowledge is required. If you still don’t know how to get it done you can always hire someone from oDesk or Freelancer.com to do this job for you. For developer it won’t take more than few minutes to put everything in place.

  18. A very nice tutorial of how to translate WordPress themes is given. The Poedit software package for translating this is also freely available. Thanks a lot for sharing this tutorial. This is going to become my default resource for theme and WordPress plugin translation. Thank you!

  19. Hello,
    I am looking to download this on my Microsoft Surface 2 but it is not available. Do you have any solution for this?
    Thanks a lot!
    Fabio

    1. Fabio,

      if you are using Microsoft Surface 2 RT version then you are out of luck as there is very limited apps available for this device and should look for some web services that offers .po file creation and editing online inside your browser. This one works just fine but there are plenty of other services available. If you are using Microsoft Surface 2 Pro (version that comes with a regular Windows and not Windows RT) then above mentioned app will work just fine.

      If you translate this theme fully I would really appreciate if you could send translation files to me and I will include it in the next theme update. Thank you!
      Here we keep the track of available languages for all of our free themes.

  20. Leave a Reply

    Your email address will not be published. Required fields are marked *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>