[wp-polyglots] i18n-ed theme and the repository

Pandem pandemtandem at gmail.com
Wed Oct 3 19:32:55 GMT 2007


Nikolay Bachiyski escribió:
> 2007/10/3, Mohd Tarmizi <tarmiziaffandi at yahoo.com>:
>   
>> ...and where should I put the translation files? "theme/default", I persume?
>>     
>
> No, in your repository:
>
> wordpress-i18n/<your-locale>/<branch>/messages/kubrick/<your-locale>.po
>
> The Codex page on the repository structure is also updated:
>
> http://codex.wordpress.org/Translating_WordPress#Repository_File_Structure
>
> Nikolay.
>
>   
Some thoughts about directory structure:

- As per Ryan Boren's guidelines on theme localization, "Theme catalogs
are loaded with load_theme_textdomain(). load_theme_textdomain() looks
in the active theme directory for a file called $locale.mo. Strings are
marked in the same way that plugin strings are marked."[1] Thus,
shouldn't we place kubrick's $locale.po and $locale.mo within the theme
directory?

- WordPress falls back on default theme in case something goes wrong
with the chosen template. To do this, it relies on having default theme
folder being named as 'default'. If we replace the contents of this
folder with our internationalized kubrick, and at some stage the
internationalization/localization process goes wrong, there'll be no
fallback. Same if we rename 'default' as 'default-en'. Couldn't we keep
the default theme in English, add the 'kubrick' folder to /theme and
change the header in style.css to something like

Theme Name: WordPress Default International
Theme URI: http://wordpress.org/
Description: The default WordPress theme based on the famous <a
href="http://binarybonsai.com/kubrick/">Kubrick</a> and
internationalized by WordPress Polyglots.

of course, translated to the target language?

Maira Belmonte

[1] http://boren.nu/archives/2004/11/01/localizing-plugins-and-themes/



More information about the wp-polyglots mailing list