06. Tips & Tricks - Translating the theme

Translating the theme

This theme is localized, which means it can easily be translated in your own language. There are various method to do a simple translate or create a website in multiple languages, so just use the one one which works best for you.

Simple Translate

  • Download and Install Poedit
  • Go to "wp-content/themes/alice/languages/" and open "default.po" file
  • In the window that appears you have all the strings that were used in the theme, so you just need to go through theme and write a translation
  • When you are done go to "File -> Save as" and save your translation in a " *.po " file
  • You should name your file "pt_LANG". It's just a naming conversion
  • When you're done translating open "wp-config.php" from your Wordpress root folder and replace this line: define ('WPLANG', ''); with define ('WPLANG', 'pt_LANG');

Let's take a pratical example, if you are using Wordpress in italian, your .po file should be called "it_IT.po" and the Wordpress Language should be defined like define ('WPLANG', 'it_IT');

Multilanguage

If you're looking for having your website in two or more languages, there is a powerful plugin which you can use. Because of the module builder, you need a plugin which handles meta fields. This plugin is WPML