I18N Standards / Code Snippets
Internationalization reference: ISO country codes, US states, Canadian provinces, Mexican states and time zone lists as ready-to-use data.
Loading tool...
Internationalization standards explained
i18n and l10n
Internationalization (i18n) makes a product able to adapt to different languages and regions. Localization (l10n) adapts it to one specific locale.
Locale identifiers: BCP 47
| Tag | Meaning |
|---|---|
en |
English |
en-US, en-GB |
English (US), English (UK) |
zh-Hant-TW |
Chinese, Traditional script, Taiwan |
sr-Latn-RS |
Serbian, Latin script |
The standards behind the data
| Standard | Defines |
|---|---|
| ISO 3166 | Country codes |
| ISO 4217 | Currency codes |
| ISO 639 | Language codes |
| IANA tz database | Time zone identifiers |
| Unicode CLDR | Locale data (patterns, plural rules, collation) |
| ISO 8601 | Date and time notation |
| ITU-T E.164 | International phone numbering |
Practical advice
- Never hard-code formats. Use
Intl,java.text,CultureInfo. - Store canonical values, format at display time.
- Locale is not region is not language.
- Test with "difficult" locales: German, Arabic, Japanese, Indian English.