dreamworkAPI
Ctrl K
GitHub
typeDocs / fluent / Locale

fluent.Locale

typesharedmenusource

The formatting data of the locale.

Date and time patterns contain {token} placeholders:

  • {d}, {dd} - the day, {dd} is zero padded;
  • {M}, {MM} - the month number, {MM} is zero padded;
  • {MMM}, {MMMM} - the short and full month name;
  • {y}, {yy} - the full and two-digit year;
  • {E}, {EEEE} - the short and full weekday name;
  • {H}, {HH} - the 24-hour hour, {HH} is zero padded;
  • {h}, {hh} - the 12-hour hour, {hh} is zero padded;
  • {mm}, {ss} - the zero padded minute and second;
  • {a} - the day period, am or pm.

Fields

NameTypeDescription
tagstringThe locale tag, e.g. "pt-BR".
decimalstringThe decimal separator.
groupstringThe grouping separator.
minusstringThe minus sign.
minimum_groupingintegerThe minimum number of digits in the leading group, 2 means 1000 is not grouped.
primary_groupintegerThe size of the lowest group of the integer digits.
secondary_groupinteger | nilThe size of higher groups, primary_group if nil.
percentstringThe percent pattern, # is the number, e.g. "# %".
currencystringThe currency pattern, # is the number, ¤ is the currency, e.g. "¤#".
cardinalfluent.PluralRuleThe cardinal plural rule, 1 file, 2 files.
ordinalfluent.PluralRuleThe ordinal plural rule, 1st, 2nd.
datetable<string, string>The date patterns by styles, short is required, missing styles fall back to short.
timetable<string, string>The time patterns by styles, short and medium are required.
datetimestringThe pattern joining the date and the time, {date} and {time} are the patterns.
monthsstring[]The full month names, used by {MMMM}.
months_shortstring[]The short month names, used by {MMM}.
weekdaysstring[]The full weekday names, Sunday first, used by {EEEE}.
weekdays_shortstring[]The short weekday names, Sunday first, used by {E}.
amstringThe before noon day period.
pmstringThe after noon day period.
Generated from the dreamwork meta branch.