Okay
  Print

Translating the theme

Here's a step by step instruction on how to translate Daze in (let's say) French. Same logic is applicable for any other language.

1. Open PoEdit and go to File -> New from POT/PO file...

2. In browse window that will open, locate the daze.pot file and open it.

3. What you get next, should look like the screenshot below. Now, in Translation Language popup, choose the language you're translating into - in this case - French (France).




4. Now you should get a screen that looks something like this:



 Don't be confused when on the right sidebar you see the Erreur 404 and the 404 error text on the left listing. This is no error message from PoEdit, but the first string you get to translate It is the message a visitor will get if he navigates to the page on your site that doesn't exist. And on that right sidebar you get the suggestions as how you could translate that message. Now you can test how it works.


5. In the bottom text area, please add your translation to the message above. It may be one of the suggested lines, or your own words, like shown in screenshot below. The same action you will repeat for all the strings listed here, but let's just complete this example with this line only. You can make changes and additions afterwards.




6. Click on the big Save button and put the generated file under the languages folder (which will probably be offered by default). Now you have your .po and .mo files generated. The next and final step is to tell WordPress to use those instead of English.

7. In your wp-admin Dashboard, please navigate to Settings -> General ->Site Language and choose the same language you declared in PoEdit - French. Save the changes and you're done Now the final test.

8. Open the site in your browser and put some fake URL for a page that you know doesn't exist. So, if your site is on http://some_random_site.fr/  try with http://some_random_site.fr/blahblahpage/ and see what happens. On our local test, the page looks as on screenshot below and our first translated line is just bellow the main menu



We hope now it's more clear how to easily translate your site into any language :)