Re: I18N for PEAR (before Language class for PEAR?)

From: Date: Sun, 10 Feb 2002 17:09:10 +0000
Subject: Re: I18N for PEAR (before Language class for PEAR?)
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-4561@lists.php.net to get a copy of this message
On Sunday 10 February 2002 17:15, Björn Schotte wrote: > > > Nope, generally localized images. > > can you please explain what you really mean. > Imagine callmeback.gif, a button where you can > see "Call me back!" on it (and it wasn't generated > by PHP). In German, you need a callmeback_ger.gif > with the text "Bitte um Rückruf!". > > These cases should also be handled by an i18n > class. ok, so we need some kind of mechanism, that i18n implements that can handle resources of any kind, is that what you mean would a good example be something like this: you save all images for the different languages in directories like ../images/en ../images/de etc. and if you want to get the pic "callmeback.gif" you call $img = I18N_Resource::get( 'callmeback.gif' ) where "get" returns the image from the current directory depending on the language, if it is not in the current language's directory it gets it from the "fallback"-directory that you can define, when setting up a class, to be sure you always get an image, even though not all of them are translated yet. and the resource class may also be so flexible that you can generate a image/file name (as your example assumes) instead of a directory name, as my example assumes. does that meet your ideas? what else do we need to handle? -- Wolfram ... translating template system ... http://wolfram.kriesing.de/SimpleTemplate

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