ICU Locale Explorer > Help
If you see this message, it's likely that you're looking for a help topic that's not written yet.
You can go to news://news.software.ibm.com/ibm.software.unicode to ask your
question.
Please send any comments or suggestions for improvement of this help file to icu4c@us.ibm.com
Display Problems
The output of this dynamic page is dependent on your browser settings, installed fonts, and which encoding you choose. If text displays incorrectly, you may need to change the encoding at the bottom of each Locale Explorer page.
Display Q&A
(missing resource) - MISSING_RESOURCE_ERROR
The resource you asked for did not exist, nor could a suitable default be
found.
AM & PM
Collation rulesx
Specifies the rules to be used for collating (comparing and sorting)
text. The rules may be found in the ICU documentation for TableCollator.
Countries
Specifies the display name for the given country codes.
Used for converting a country code or the country portion of a
locale into a displayable name.
Currency Elements
These strings are used in parsing/formatting numbers which are designated as currency values.
- Currency Symbol
This is used whenever a 'currency symbol' (\u00A4) is encountered in a currency number pattern.
- Int'l Currency Symbol
Three-letter international code for a currency. Used where a doubled currency symbol (\u00A4 \u00A4) is encountered in a number pattern.
- Currency separator
This is used as the decimal separator in
currency formatting/parsing, instead of the DecimalSeparator from the NumberElements list.
Date & Time Options
- First day of the week A number indicating which day of the week is considered the 'first' day, for calendar purposes. It is 1-based, with 1 being Sunday, 2 being Monday, .. 7 being Saturday.
- Minimal Days in First Week - Minimal days required in the first week of the year are; For
example, if the first week is defined as one that contains the first day of the
first month of a year, this value will be 1. If it must be a full week,
the value will be 7.
Date & Time Patterns
The first 8 items are different lengths of either date or time
patterns. See the localPatternChars (in the locale) for the meanings of special characters.
- Quoting rules: Single quotes, ('), enclose bits of the pattern that should be treated literally. Inside a quoted string, two single quotes ('') are replaced with a single one ('). For example: 'class of 'YYYY' at 'h' o''clock' -> class of 1939 at 6 o'clock (Literal strings underlined.)
Day
This resource contains the full and short (abbreviated) names of the days of the week, starting with Sunday.
Eras
Display strings for the eras. (2 for the default, Gregorian calendar: BC,AD.)
Languages
Display names for language codes.
Windows Locale ID
Hexadecimal Locale ID for this Locale as used by Microsoft Windows. See www.unicode.org for a description of these ID's.
Month
Full and short (abbreviated) month names, starting with January
Number Elements
Symbols used in number formatting and parsing. Used in NumberPatterns.
- Decimal Separator - separates the integer and fractional part
of the number.
- Grouping Separator - groups (for example) units of thousands: 10^6 = 1,000,000.
The grouping separator is commonly used for thousands, but in some
countries for ten-thousands. The interval is a constant number of
digits between the grouping characters, such as 100,000,000 or 1,0000,0000.
If you supply a pattern with multiple grouping characters, the interval
between the last one and the end of the integer is the one that is
used. So "#,##,###,####" == "######,####" == "##,####,####".
- Pattern Separator - sets the character used for separating variant expressions. (For example: 0.00;(0.00) where the second pattern is the form to use for negative number)
- Percent - symbol used to indicate a percentage (1/100th) amount. (If present, the value is also multiplied by 100 before formatting. That way 1.23 => 123%)
- ZeroDigit - Symbol used to indicate a digit in the pattern, or zero if that place would otherwise be empty. For example, with the digit of '0', the pattern "000" would format "34" as "034", but the pattern "0" would format "34" as just "34". As well, the digits 1-9 are expected to follow the code point of this specified 0 value.
- Digit - Symbol used to indicate any digit value. If that digit is zero, then it is not shown.
- Minus Sign - Symbol used to denote negative value.
- Exponential - Symbol separating the mantissa and exponent values.
- PerMill - symbol used to indicate a per-mille (1/1000th) amount. (If present, the value is also multiplied by 1000 before formatting. That way 1.23 => 1230 [1/000])
- Infinity - The infinity sign. Corresponds to the IEEE infinity bit pattern.
- Not a number - The NaN sign. Corresponds to the IEEE NaN bit pattern.
Number Patterns
Patterns for formatting different types of numbers.
Note that the NumberElements resource
affects how these patterns are interpreted.
- Decimal
- Currency
Use \u00A4 where the local currency symbol should be. Doubling the
currency symbol (\u00A4\u00A4) will output the international currency
symbol (a 3-letter code).
- Percent Pattern for use with percentage formatting
- Scientific Pattern for use with scientific (exponent) formatting.
- Quoting rules: Single quotes, ('), enclose bits of the pattern that should be treated literally. Inside a quoted string, two single quotes ('') are replaced with a single one ('). For example: 'X '#' at 'h' o''clock' -> class of 1939 at 6 o'clock (Literal strings underlined.)
Locale Codes
2 and 3 letter ISO codes for the language and country, as well as the variant codes.
Version
Version of the ICU data files.
Localized Date Pattern Chars
These characters are replaced with the appropriate values when a date or time
is being formatted.
Characters may be used multiple times. For example, if y is used for the year, 'yy' might produce '99', whereas 'yyyy' produces '1999'.
For most numerical
characters, the number of characters specifies the field width. For example, if h is the hour, 'h' might produce '5', but 'hh' produces '05'. For some characters, the count specifies whether an abbreviated or full form should be used.
Note: In the following list, the default (English) form is used as an example, but see the actual locale for the correct characters!
- G Era - Replaced with the Era string for the current date.
- y Year - Use two for the short year, or 4 for the full year
- M Month - Use one or two for the numerical month, three for the abbreviation, or four for the full name.
- d Date - Day of the month. Use one, or two for zero padding.
- k Hour of day 1 [Midnight appears as '24']
- H Hour of day 0 [0-23]
- m Minute - Use one or two
- s Second - use one or two
- S Millisecond - Use 1,2, or 3.. shows the MOST significant digits.
- E Day of week - Use three for the short day, or four for the full name.
- D Day of year - Use 1-3
- F Day of Week in Month- use one. This is 1 for the first day of the week, etc..
- w Week of Year - use 1 or 2.
- W Week of month - use 1
- a AM or PM
- h Hour 1 - Noon and Midnight show up as "12"
- K Hour 0 - [0-11]
- z Timezone. Use 3 for the short timezone (i.e. PST) or 4 for the full name (Pacific Standard Time). If there's no name for the zone, it'll show up as GMT+/-hh:mm.
Time Zones
Localized names for time zones. The columns are, in order:
- Canonical name for the time zone
- Display long name for the normal time zone
- Abbreviation for the normal time zone
- Display long name for the time zone on summer/daylight savings time
- Abbreviation for the time zone on summer/daylight savings time
- A city in the specified time zone.
Collation (sorting) Example
This example demonstrates how the ICU can sort text in a
locale-specific way. Type some lines of text into the box provided,
and click sort. The text will be sorted according to the collation
rules of the specified locale. All four different strengths will be
tried, and the results are shown side by side.
Note that you may type in unicode values directly. For example,
typing '\u0416' will be replaced with the Cyrillic letter "Zhe",
which is at Unicode code point U+0416.
For more information, see the ICU Documentation and Unicode Technical Report #10: Unicode Collation Algorithm.
Number Pattern Demo
In this example you can try creating localized patterns and
formatting numbers using those patterns.
The top form shows the pattern you are working with. It is the same
kind of pattern as the pre-set patterns found in the NumberPatterns resource. Also, see the NumberElements resource for important
information on the characters used in each pattern.
The left hand side shows the number that will be formatted. You may
change this number (and click Change) to see it's effect on the
formatted number.
The right hand side shows the formatted number. You may also change
the formatted version of the number (and click Change) to see it
converted back onto the left hand side.
Note that you may type in unicode values directly. For example,
typing '\u0416' will be replaced with the Cyrillic letter "Zhe",
which is at Unicode code point U+0416.
Date&Time Pattern Demo
In this example you can try creating localized patterns and
formatting dates using those patterns.
The top form shows the pattern you are working with. It is the same
kind of pattern as the pre-set patterns found in the DateTimePatterns resource. The
characters used in the pattern are the localized pattern characters for that
locale. They are reprinted at the bottom of the demo for your
convenience.
Below the pattern is the current date/time (at left), and the
formatted version using your pattern (at right).
Note that you may type in unicode values directly. For example,
typing '\u0416' will be replaced with the Cyrillic letter "Zhe",
which is at Unicode code point U+0416.
End of help