Re: Language class for PEAR?

From: Date: Sun, 10 Feb 2002 17:30:11 +0000
Subject: Re: Language class for PEAR?
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-4566@lists.php.net to get a copy of this message
Wolfram Kriesing wrote: > > What do those classes provide? Very complete solution, good stuff. [..] > 3. Another important thing when designing this class was that it can > also translate dynamic strings, like: > "Welcome $USERNAME to $APPLICATION_NAME!", > where the order of those variables might also be different in another > language, i.e. into German you may translate it as: > "Willkommen zu $APPLICATION_NAME, $USERNAME!". > This is done here by using simple regular expressions (pieces). The > example would be saved as this, if the "source language" is english: > english: "Welcome (.*) to (.*)!" > german: "Willkommen $2, $1!" I would use the gettext style here: "Welcome %s to %s". How people will translate the messages? Could you provide an example? Tomas V.V.Cox

« previous php.pear.dev (#4566) next »