I am looking for Drupal and PHP I18N/L10N best practices. I am writting a LAMP app that needs to
a) Accept NLV characters (chinese, japanese, etc).
b) Store those in the DB (MySQL)
c) Be localizable (at least spanish, french, chinese, etc.)
d) Some values in the database need to be localizable as well (for example a FoodName that in english is chicken, in spanish is "pollo", etc.)
I googled some stuff and I even found that in 2003 Joel said that PHP cannot handle NLV chars. This is scary. I also found that PHP 6 will have I18N built in but in the mean time I cannot use it.
Any links or info and/or advise on this?
Wednesday, January 09, 2008
PHP can support I18N alright depending on your needs.
For example, my PHP forum software supports international characters perfectly fine. The pages are rendered in UTF-8 (very easy in PHP) and the database character set is also UTF-8. I don't really do that anything special to handle it.
Things get a little trickier if you want to delve into the strings -- split them, calculate length, etc. PHP does provide functions for working with multibyte strings of various character sets but you have to use them specifically.
Almost H. Anonymous
Thursday, January 10, 2008
This topic is archived. No further replies will be accepted.Other recent topics
Powered by FogBugz