[wp-hackers] Re: [wp-polyglots] no-code-duplication i18n for WordPress

Stefano Aglietti steagl4ml at gmail.com
Wed Jun 4 16:46:36 GMT 2008


On Wed, 04 Jun 2008 19:56:43 +1000, DD32 <wordpress at dd32.id.au> wrote:

>Just a few quick thoughts:
>wp-includes/strings.php
>  * Contains any hard coded strings in english, Ie. strings for before  
>gettext is loaded.
>wp-load.php:
>  * Checks to see if wp-content/strings.php exists
>    * If so Include that file
>    * Else, include the default wp-includes/strings.php file
>
>wp-load/wp-settings/etc for before gettext loaded:
>  * Reference to $hardcoded['no_db'], or $hardcoded['php_too_old'] rather  
>than hard coded strings.
>
>Result:
>  * Core files not modified, Localised distributions have to include a  
>single extra file in the distro in the users content folder
>  * Static files would notbenefit from that, but, i would hope that  
>instead, translated versions were included, ie. readme.html = english,  
>readme-fr.html = french translation

*1 for this... the only thing i would change is the position of locale
strings.php that should go with other languages file
(wp-includes/languages/ actually)

-- 

Stefano Aglietti - StallonIt on IRCnet - ICQ#: 2078431
Email: steve at 40annibuttati.it steagl at people.it
Sites: http://www.40annibuttati.it (personal blog)
       http://www.wordpress-it.it (WordPress Italia)


More information about the wp-polyglots mailing list