Re: localisation in web applications

From: Date: Tue, 19 Dec 2000 18:12:15 +0000
Subject: Re: localisation in web applications
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-31026@lists.php.net to get a copy of this message
> That's the way I thought about: building arrays which contain all the > language dependent strings and so on. The idea is to give a extracted > language file to a translator (someone who don't have knowledge about > programming, php ...) and get back a translated file. Unfortunately the > file have to be mixed with php-code, defining variables/arrays etc. . So I > don't have a really extracted php-independent file. That's the reason why I > thought about xml. With xml - that's my idea - I can extract all strings > from my application, put it in a xml representation. Then I can use the > ability from xml to present the strings in a different way for a better > translation. > > I you have any hints about this idea, please let me know. I'll jump in and say that we tackled this problem in FreeTrade by making language modules, one for each language. Inside are a bunch of constants. That was long before Gettext was integrated. For something that's likely to have a fixed set of messages, you're probably best off going with Gettext since it's a solution that's been around for a long time. There are some nice things about it. The downside is that you have to deal with yet another data format. But I think the interface for novices is probably better than a giant PHP script full of define() statements. Leon --- Leon Atkinson <http://www.leonatkinson.com/>

« previous php.general (#31026) next »