From: Christian H. <ch...@ng...> - 2004-06-25 15:45:46
|
On 2004-06-18, at 05.41, JT Smith wrote: > The following is my recommendation for the new internationalization > format. > > Before I get too far I should say that I've investigated the old > standby: gettext. It won't work for WebGUI for these reasons: > > -It can't do HTML. Thats good, because this data has very little to do with presentation. > - You have to be careful with special characters. If you keep your data in a unicode format, like utf-8 it wont be an issue. > - It won't be backwards compatible with our current system so all of > the work the translators have done would have to be redone, and all of > the code in WebGUI would have to go through and be replaced. That's probably a hit you'll have to take sooner or later. > - It has a lot of binary prereqs. (I don't like adding those if I can > help it.) Why is that bad? > - It doesn't provide as big of a performance increase as what I'm > about to suggest. Nothing prevent you from preload the data/classes when apache start. > lib/WebGUI/i18n/<language>/<namespace>.pm This is a common mistake, l10n has more to do with culture and language then language. Once your app is i18n you can add l10ns. A good resource is: http://www.i18nguy.com/ Have a look at Locale::Maketext::Lexicon at CPAN, it can make your life easier. -- Christian Hansen nGmedia +46 40 660 17 50 |