Translation2 ...

From: Date: Tue, 24 Feb 2004 17:50:39 +0000
Subject: Translation2 ...
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-25849@lists.php.net to get a copy of this message
Hi Lorenzo and all Translation(2) users, I try to use Translation2 and I think there are some things that could be done otherwise or added. I'm using MySQL with the DB container, with one table for each language. 1. String retrival process -------------------------- When I set a pageId and try to get a value for a key that is not defined with that pageId but is defined with a NULL pageId, I think Translation2 should return that value instead of the general fallback string. 2. Language parameters ---------------------- It should be possible to use as many fields as needed in the language list table, not just the "name", "meta" and "error_text" ones. The getLang() method could maybe take a field name as its second parameter so that it is possible to call $tr->getLang('en', 'my_own_field'); without any configuration needed elsewhere. 3. Fallback languages --------------------- It should be possible to use lists of fallback languages instead of just one, with fallback mechanism in the order of the list. It should also be possible to set this list in the languages list table, with a new 'rank' column for example, which let you change this for all pages without the need to change every call to the setLangFallback() method. 4. Automagical prefered language detection ------------------------------------------ It should be possible to let Translation2 select the correct language according to several possible sources, such as GET, POST, COOKIE or SESSION info, browser prefered languages configuration, etc. Everything is already done in my phpLang project [1], which could maybe be integrated in Translation2 as a guessPreferedLanguage() method. [1] http://phpheaven.net/projects/phplang/ Waiting for any comment on these topics, I will continue to dig into Translation2 features... ;) Regards, -Nicolas -- Nicolas "Brush" HOIZEY Free PHP projects http://www.phpheaven.net Veille tous azimuts http://www.gasteroprod.com Clever Age http://www.clever-age.com

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