I increasingly want to get my code i18n'zed but have little experience in this area - so if the stuff I'm writing below is rubbish, please let me know!
Ok, I need to think about:
1) Character classification and case conversion.
2) Collation order.
3) Date and time formats.
4) Numeric, non-monetary formatting.
5) Monetary formatting.
6) Message translation.
7) Loads of other l10n stuff such as zip codes, tel numbers etc.
Traditionally I presume the locale pragma and POSIX locale functions provided part of the required functionality, but from reading the perl docs, there are problems such as:
1) Limited to Unices.
2) Even with Unices, the available locale info varies drastically.
3) Perl locale handling is a bit clunky, and not all categories are handled by core functions (eg Monetary).
4) Granularity is at the application level - difficult to have simultaneously multi lingual applications.
So, I turn to 5.8 documentation/core 5.8 modules and CPAN for help:
5.8 documentation says use unicode and avoid mixing unicode and locales.
So, am I correct in thinking unicode only provides character set/conversion and collation support?
Therefore I decide to use Unicode exclusively - does this also mean I shouldn't be using built in collation functions (sort, cmp etc), instead using Unicode::Collate?
And if that's true, how on earth do you actually use Unicode::Collate - say, purely for example, I want to sort a list of Spanish words, what arguments should I supply to Unicode::Collate->new()?
Once charsets are out of the way, is there any framework that can provide money, number, date formatting consistently, or do I have to go with modules such as Math::Currency, Number::Format, DateTime and roll my own support?
To be honest, about the only thing I'm sure about at this moment in time is using Locale::Maketext!
Please forgive this ramble, but I've yet to find much helpful information about perl i18n. The perldocs aren't that much help, and the web resources I've found seem more theoretical than practical. Everything tended to refer to formal documents such as the Unicode stuff, which had me tearing my hair out.
Any advice (preferably useful though :) would be hugely appreciated.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |