Re: Managing translations

From: Date: Tue, 20 Jul 2004 10:27:32 +0000
Subject: Re: Managing translations
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-4806@lists.php.net to get a copy of this message
Hi James The way I did it was to build my software using language packs from the outset (simple, uncomplicated text files where $var="var_translated";) with whatever name I wanted (i.e. cym.php for welsh, enuk.php for UK english, enus.php for US English etc). That way the interface is independent of the user's language, which can be changed on the fly by pressing a button/flag of your choice. It also makes is much easier to update and extend the system with new languages as they get added. Obviously, interface text changes need to be managed properly, but it is much easier than having multiple builds in multiple languages. I manage my language packs via a database, but with a file based input output structure. I update all my source language packs, then get the database to read them all in and output them to the 'output' directory. This has the advantage of keeping source and output separate, with an automated update process to ensure nothing gets missed. It also spots parsing errors when I make them, which makes the extra stage invaluable in avoiding errors! Hint, watch out for needing multiple escape characters (i.e. \\\" )! cheers Biz On Tue, 2004-07-20 at 10:08, James Cameron wrote: > G'day, > > My PHP-GTK application consists of a Glade XML file containing the > widget tree, and the PHP file that instantiates it. > > Someone has contributed a translation of the XML file in Spanish. > > This adds a burden to me of propogating every change that I make to the > XML file, into the Spanish file. > > Is there a better way? Some sort of Glade or PHP-GTK equivalent to the > internationalisation tool gettext? > > -- > James Cameron mailto:quozl@us.netrek.org > http://quozl.netrek.org/

« previous php.gtk.general (#4806) next »