Weaver has been designed so that its visitor pages will display properly in your native language using the included translation files for over a dozen languages, or creating a new translation file using existing WordPress and Twenty Eleven theme translation files. This page has instructions for:
- Creating a new translation file for your own language.
- Adding a button to have your site’s pages automatically translated and displayed in a different language.
(Note – the following instructions can be used to create alternate wording versions of the messages in any language, including English.)
Using Weaver in your language
Weaver II is distributed with translation files for over 14 world languages which will automatically be used if your site has been set up properly for your language. Beyond that, WordPress and Twenty Eleven have translations available for many languages that can serve as a base for making a new Weaver II translation.
If you need to make your site display in a language other than English, the place to start is the Installing WordPress in Your Language page at WordPress.org. You need to install WordPress for you own language. When you do that, you will get all the translation files for core WordPress, plus the default themes included with WordPress. (Weaver II already includes its own translation files for many languages.)
Because Weaver II visitor side wording is based on a combination of the default Twenty Eleven theme and standard WordPress messages, those two translation files can serve as a basis for creating a new visitor side translation for Weaver II beyond those already included.
The Weaver admin panel, on the other hand, is still strictly English – it is has so much help and explanations, that it would be very difficult to translate.
But the important part is that you can easily use the existing language translation files for Twenty Eleven and WordPress with Weaver II to create a new translation file so that people who visit your site will see your native language.
Here’s what you need to do. The goal is to download three files from your site to your own computer, use a free tool called Poedit to create the translation, and then upload the translation back to your site. You may need to use your site’s host control panel interface (e.g., cPanel), or use your ftp access. Here are the steps.
- Download Weaver II’s .pot translation file. It is found at /wp-content/themes/weaver-ii/languages/weaver-ii.pot. (/weaver-ii-pro if you have that version) After you have downloaded it to your own computer, rename it to reflect your local language – for example, es_ES.po if you were doing a Spanish version (that’s already been done, but we will use es_ES for the rest of our examples). This file will become the main translation file you will eventually re-upload to your site.
- Find Twenty Eleven’s language directory. It will usually be at “/your-site-root-directory/wp-content/themes/twentyeleven/languages“. That directory contains the Twenty Eleven language files. Once your site has been installed for your language, that directory should contain 2 or 3 files (perhaps more). Two of those files will match your language setting. For example, if you have installed the Spanish version of WordPress, you’ll find es_ES.po and es_ES.mo there. Download the es_ES.po (use your own language equivalent) file to your computer, but rename it to something like es_ES-2011.po so you can tell it apart from the other files.
- Now find the WordPress main language file. It will be found at /wp-content/languages/es_ES.po. Again, download that file to your computer, using your language, and renaming it (for example, es_ES-wp.po) so you don’t mix it up with the other two files.
- You should now have three files on you computer – Weaver II’s weaver-ii.pot renamed to es_ES.po, and the two files from WordPress – es_ES-2011.po and es_ES-wp.po.
- Now download Poedit from http://www.poedit.net – it has versions for both Mac and Windows. This will serve as your main tool for creating the new translation.
- Open the main Weaver II es_ES.po file. It should contain all the visitor side strings (about 100 of them), but no translations. The goal will be to find the translations from the other two files, and copy/paste them into the Weaver II file.
- Open each of the other files, es_ES-2011.po and es_ES-wp.po in new Poedit windows. These files will have a bunch of strings with both the English and the translated versions.
- Here’s the procedure:
- Click on the first untranslated string in the Weaver version. This will be displayed in the top one of two boxes on the lower part of the Poedit window. The top one is English, the bottom one (should be empty now) the translated version.
- In the English box at the bottom, select the entire string, and copy it. (You’ll want to learn the short cut key for select all, copy, and paste – usually cmd-A, cmd-C, and cmd-V – where cmd is the appropriate key for Mac or Windows).
- Now switch to the Poedit window that has the Twenty Eleven version of the translation – most of the strings will be found in that file, but some are still in the WP file. Enter the Find command (cmd-F), and paste the original English string into the find pattern. This will find the translated string. If you don’t find it in the Twenty Eleven version, search for it in the WP version. This will work for all strings except a couple involving RSS, which you can usually just use RSS as the translation.
- Now select and copy the translation from the Twenty Eleven or WP bottom window, and move to the Weaver window. You can now paste that translation into the bottom box on the Weaver Poedit window.
- Repeat for each string. This can be done in 20 or 30 minutes, usually.
- If you can’t find a string, feel free to provide your own translation or modify a similar one.
- Save you work often. Whenever you save, Poedit will create both a .po and a .mo version of the translation files.
- Finally, upload the new es_ES.po and es_ES.mo created by Poedit to your /wp-content/themes/weaver-ii/languages/ directory (or weaver-ii-pro for the pro version). Your visitor side translations should be automatically used now.
You can use this procedure to edit an existing file as well if you want to create a different translation. You can even use this technique to create alternate wordings for any visitor side message, even for the English version.
If you do create a new translation, you can help out others using Weaver II in your language by sharing your translation. Please send it to us, and we will include it in future versions of Weaver II.
Auto Translation of you whole site
If you want your site to be available in many languages, try the Google Translator widget. At a click of a button, Google will translate your site’s pages into one of a many of different languages. For example, at weavertheme.com, you can see the click-to-translate button on sidebar. It is machine translated, but the translations seem to have gotten pretty good.