Wednesday, December 19, 2012 | 10:26 AM
International Components for Unicode (ICU) or Windows APIs.
By Mark Davis, International Software Architect
Until now, it has been very difficult for web application designers to do something as simple as sort names correctly according to the user's language. And it matters: English readers wouldn’t expect Århus to sort below Zürich, but Danish speakers would.
Linguistic sorting is not the only benefit—not only will users be able to see names sorted correctly, but also correct numeric values (“1,234.56” in English, but “1.234,56” in German), dates (“March 10, 2012” vs “10. März 2012”), and so on. While the results might not be precisely the same in every browser, they should be appropriate to the language, and are returned using a uniform API.
On any enabled browser — in its supported languages — web application developers can:
- compare strings correctly: choosing whether or not to ignore accents, case differences, etc.
- format numbers correctly: choosing decimal places, currencies, whether to use thousands-separator, etc.
- format dates and times correctly: choosing decimal places, numeric vs named months, etc.
- match locales: comparing the user’s desired locales (say Arabic and French) against the supported locales (say French, German, and English), to get the best match.
Mark Davis is president and cofounder of the Unicode consortium, and founder of ICU and CLDR. Mark is fond of food, film, travel, and RPGs. Mark lived for 4 years in Switzerland, and is moving back in February.
Posted by Scott Knaster, Editor