Internationalisation and localisation
These closely related terms, also spelt internationalization and localization
in US spelling, refer to the process of making a program adaptable to different languages and
locales, and then adapting that internationalised program available in a particular
locale. Issues that typically arise during the process of internationalising a program include:
- string translation, which in turn involves issues such as:
- realising what strings in your program need to be treated as separate variants
for the purpose of translation;
- having a mechanism for selecting the version of a given string in a given language;
- making components in your application flexible enough to cope with strings of different
lengths and with different character sets;
- actually presenting the strings in an appropriate form for a translator, and then
for your program.
- string sorting and comparison: languages differ may in the sort order for a given
bunch of strings, or in whether they consider two strings to be "equal" for a given purpose; via
the collator class, it is possible to sort and compare strings in
a more language-relevant way than via the "raw" Collections.sort() and String.compareto()
- formatting of dates and numbers (do you put a comma or full stop between the thousands in a printer number? do you put the month before or after the day?)
If you enjoy this Java programming article, please share with friends and colleagues. Follow the author on Twitter for the latest news and rants.
Editorial page content written by Neil Coffey. Copyright © Javamex UK 2021. All rights reserved.