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 WordPress theme translation from there.
Please note! This tutorial will apply on most WordPress themes that are translation ready and not just, Sparkling, Dazzling, Travelify or Pinbin so feel free to read further even if you are not using our themes.
Before you start (Important)
This guide can still be used to translate any WordPress theme, however, there is now an option to translate them directly using GlotPress. For more information on how to proceed, please read this guide.
How to translate WordPress Theme?
Please read a chapter above this before you proceed with “old” method of translating themes.
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.
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.
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.
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.
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');
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:
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.
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!
We have updated this guide to include information about WordPress 4.0 which makes it easier to use WordPress in your own language.
We hope you find out how to translate a WordPress theme and now can give back to community by translation themes and plugins for others to use. We are giving away free WordPress themes and I hope you will do that with theme translations as well.
Now you can translate our WordPress themes directly on WordPress.org and your theme translation files will be automatically taken and used by sites that switch languages. You can find all our WordPress themes here. For translation just go to particular theme such as Shapely and then to section that says Translate Shapely on the right side of theme description.