Magnolia 5.7 reached extended end of life on May 31, 2022. Support for this branch is limited, see End-of-life policy. Please note that to cover the extra maintenance effort, this EEoL period is a paid extension in the life of the branch. Customers who opt for the extended maintenance will need a new license key to run future versions of Magnolia 5.7. If you have any questions or to subscribe to the extended maintenance, please get in touch with your local contact at Magnolia.
This page provides a brief overview of:
- What is locale?
- Which locale parameters are directly configurable in Magnolia.
What is locale?
Generally speaking, a locale in computing is "a set of parameters that defines the user's language, region and any special variant preferences that the user wants to see in their user interface" (Wikipedia).
Locale is more often associated with the language parameter, which is usually defined by a two-, three- or four-letter language code, standardized under ISO 639. See the IANA Language Subtag Registry for a complete list of available language codes and language variants.
Nevertheless, the set of locale parameters is much broader than just the parameter for language. Any operation that requires a locale to perform its task is locale-sensitive. For example, even displaying a number may be a locale-sensitive operation: the number should be formatted according to the conventions of the user's native country, region, or culture.
Locale-sensitive parameters
The following is a list of the most common parameters that one should be aware of when implementing a locale-sensitive operation:
- Language
- For instance, British English:
en_GB
vs American English:en_US
. - See the AdminCentral and public locales page for configuration in Magnolia and java.util.Locale .
- For instance, British English:
- Time zone
- Nine standard time zones in the USA, for example.
- See the Time zone subpage and java.util.TimeZone .
- Nine standard time zones in the USA, for example.
- Date-time format
- UK:
14 March 2016
vs US:March 14, 2016
. For details see java.text.DateFormat .
- UK:
- Number format
- English:
3.14
vs Czech:3,14
, for details see java.text.NumberFormat .
- English:
- Paper size
- US, Canada and other countries:
ANSI Letter
vsISO A4
in many other nations.
- US, Canada and other countries:
- Currency format
- Please refer to Currency codes - ISO 4217, listing currency codes used in banking and business globally.
Further resources
- Internationalization: Understanding Locale in the Java Platform (by John O'Conner)
- Locale (computer software) (Wikipedia)
- Decimal mark: Influence of calculators and computers (Wikipedia)
- Writing paper and certain classes of printed matter - ISO 216:2007
- Country Codes - ISO 3166