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

DD32 wordpress at dd32.id.au
Wed Jun 4 09:56:43 GMT 2008


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

Once again, Thats just quick thoughts, I dont know if any would actually  
be implementable or not..
I guess i shouldn't comment when it comes to internationalised versions  
given i'm not 100% sure how they work..


On Wed, 04 Jun 2008 19:34:08 +1000, Bertilo Wennergren  
<bertilow at gmail.com> wrote:

> Francesc Hervada-Sala:
>
>> Am Dienstag, 4. März 2008 09:04:12 schrieb Lionel Elie Mamane:
>>> I'm Lionel Elie Mamane, I recently got involved in the Debian
>>> packaging of WordPress, and I'd like to propose you an enhancement in
>>> your full-i18n procedures, so that all languages are guaranteed to
>>> use the same code, only strings differ. I come bearing "proof of
>>> concept" patches, available from
>>> http://people.debian.org/~lmamane/wordpress/ .
>
>> when we talked about this proposal we said we wanted to follow it after
>> releasing 2.5. Is it perhaps now a good time to put it into practice? I  
>> think
>> it is. This way 2.6 could have unique source files for all locales and  
>> the
>> translation could be completely done just translating .po files.
>
> I don't understand. As of now there are loads of things that have to
> be translated directly in the PHP-files since those parts can't be
> handled by gettext (po). How would those parts of the translation work
> be taken care of in the proposed plan?
>

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


More information about the wp-hackers mailing list