Re: I18N Translations

From: Date: Wed, 27 Nov 2002 12:10:08 +0000
Subject: Re: I18N Translations
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-11170@lists.php.net to get a copy of this message
On Wednesday 27 November 2002 10:12, you wrote: > On Mon, Nov 25, 2002 at 12:00:32PM +0100, Wolfram Kriesing wrote: > > - different translate levels/methods for translating either: > > plain strings, dynamic strings, markup-strings, etc. > > - a unique interface for all those data source > > like: $translate = new I18N_Message( 'mysql://user@host' ); > > $translate = new I18N_Message( 'gettext://directory' ); > > $translate = new I18N_Message( 'plainFile://file.xxx' ); > > etc. > > > > help/suggestions/implementations would be great :-) > > Hi, > > 1. I have made lately Numbers_Words class for converting numerals > into words in several different languages (de, en_US, en_GB, es, pt_BR, > pl). It is available at > http://pear.php.net/package-info.php?pacid=140 > Marcelo Subtil Marcal (translator for pt_BR language) suggested > me to include support for full currency spelling. Xavier Noguer > mentioned about your project. > > Maybe you are interested in using my class Numbers_Words > > to spell currency values: > > Something like converting "US$ 9.99" to "nine dollars and ninety-nine > > cents". sounds cool, but i think your class should do the work, something like: $NumberWords = new Number_Words ... $currency = new I18N_Currency... $spelled = $NumberWords->spell( $currency->format( '7.99' ) ); i dont think that the I18N needs to be involved in that. tha only thing the user will have to take care of will be the encoding type, which i will implement to be set using I18N::setEncoding( I18N_ENCODING_WHATEVER ); > 2. Can I make the Polish language files Common/pl*.php, or you plan > to rebuild it in some way, before that? please go ahead and make the polish translations, i would love to see the I18N become useful :-) > 3. Some values for localization you can get from locale files, that > are available in source form at > ftp://dkuug.dk/i18n/WG15-collection/locales/ > Polish version LC_MONETARY section is wrong, but would be changed > in next ISO standard (I think). > I just say that it could be the source for standard time/date/currency > format. cool, thanks > I must say that my first impression was that you just copying locale > functionality, but now I think that is very good that your class is > independent from locale files. thanks, i hope a lot of people will find it useful too :-) ps: i hope u dont mind me cc-ing it to pear-dev -- Wolfram .. translating template engine .... http://sf.net/projects/simpletpl .. authentication system .... http://sf.net/projects/auth .. opensource @ vision:produktion ... http://opensource.visionp.de

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