[wp-hackers] themes internationalization

Ryan Boren ryan at boren.nu
Sun Feb 13 01:18:54 GMT 2005


On Sun, 2005-02-13 at 01:05 +0200, Nikolay Bachiyski wrote:
> I agree that no internationalization calls in the themes will make the work of the theme writers 
> easier, but doesn't it make the work of the translators respectively harder?
> 
> In my opinion the lack of i18n in the themes, and the need of manual search for strings in the code 
> will weaken the desire for work in translators. However this is just my opinion. The power is in 
> your hands...

An i18n mailing list and subversion repository are in the works.  Once
we have the list we can discuss the i18n infrastructure for 1.5 in
detail.

For now, the thinking is indeed to avoid using gettext in the default
theme.  This shifts some of the burden from end users to translators.
But, if someone wants to maintain a gettext version of the default
theme, each translation team can decide whether to use that or do a
directly-in-the-templates translation.  We could put the gettext version
of the theme in the i18n repository.

Speaking of the repository, here's how I was thinking about organizing
it.

pot/trunk/wordpress.pot  -  The WP pot file
...
es_ES/trunk/messages/es_ES.po  - es_ES po file
es_ES/trunk/messages/es_ES.mo  - es_ES mo file
es_ES/trunk/theme/... - es_ES version of the default theme
es_ES/trunk/dist/...  - Localized versions of license.txt and
readme.html
es_ES/trunk/tools/... - Scripts to make tarballs, etc.

Of course, the directory names can be localized.

Here's how an es_ES version of WP could be created:

* Unzip/untar the default WP distribution.
* Copy es_ES.mo to wp-includes/languages/
* Copy es_ES/trunk/theme/* over the top of wp-content/themes/default/
* Edit WPLANG in wp-config-sample.php.  Set it to es_ES.  (You can even
localize the wp-config-sample.php filename if you like)
* Copy es_ES/trunk/dist/ files to the wp root.
* zip/tar everything back up.

Ryan



More information about the hackers mailing list