Module:I18n/ordinal/doc

Wikibooks වෙතින්

This is the documentation page for Module:I18n/ordinal

සැකිල්ල:Heavily used module

Translations used by Module:Ordinal[සංස්කරණය]

Translations are stored in 2 tables:

  • p.SchemeFromLang — Table matching individual languages with specific ordinal formatting schemes used by one or more languages. All unlisted languages default to the "period-scheme", i.e. "104." is the ordinal for the value "104". Languages will follow the regular language fallback chain. For example, "de-formal" would fallback to scheme for "de", and only if that does not exist would the "period-scheme" be used.
  • p.Scheme — Table of supported schemes. Each scheme has one or more parameters.
Possible parameters are:
  • rules — a value specifying the rules to apply when processing this scheme. Legal values are 'suffix', 'prefix', 'skip-tens', 'suffix-one', 'gendered-suffix', 'gendered-suffix-one', 'mod10-suffix', and 'mod10-gendered-suffix-skip-tens'.
  • superscript — if set to true, the ordinal indicator will be superscripted unless the caller specifically suppresses superscription.
  • period — if set to true, a period character is output between the numeral and a superscripted suffix
  • suffix — default suffix to append to numeral.
  • suffix_n — suffix to append if final digit of numeral is n
  • suffix_m — suffix to append if gender is male (used by 'gendered-suffix' and 'gendered-suffix-one')
  • suffix_f — suffix to append if gender is female (used by 'gendered-suffix' and 'gendered-suffix-one')
  • suffix_n — suffix to append if gender is neuter (used by 'gendered-suffix' and 'gendered-suffix-one')
  • suffix_1_m — suffix to append if value is one and gender is male (used by 'gendered-suffix-one')
  • suffix_1_f — suffix to append if value is one and gender is female (used by 'gendered-suffix-one')
  • suffix_1_n — suffix to append if value is one and gender is neuter (used by 'gendered-suffix-one')
  • suffix_n_m — suffix to append if value is n and gender is male (used by 'gendered-suffix-n', etc.)
  • suffix_n_f — suffix to append if value is n and gender is female (used by 'gendered-suffix-n', etc.)
  • suffix_n_n — suffix to append if value is n and gender is neuter (used by 'gendered-suffix-n', etc.)
  • prefix — default prefix to prepend to numeral.
  • formatlang — overrides the language value used when formatting the numeral

The heart of each ordinal formatting scheme is the rules parameter that specifies the rules to apply when processing a particular scheme. Supported values for rules include:

  • 'prefix' — the value in the prefix parameter is written before the numeral as the ordinal indicator. The superscript parameter is ignored by this rule.
  • 'suffix' — the value in the suffix parameter is written after the numeral as the ordinal indicator.
  • 'suffix-one' — If the numeral is 1 the value in the suffix_1 parameter is written after the numeral as the ordinal indicator, otherwise the value in the suffix parameter is written after the numeral as the ordinal indicator.
  • 'mod10-suffix' — the value in the suffix_n parameter is written after the numeral as the ordinal indicator if the final digit of the numeral is n. If the matching suffix_n parameter is not present, the value in the suffix parameter is written after the numeral as the ordinal indicator.
  • 'skip-tens' — works the same as 'mod10-suffix', except that numeral values in the range 10..19 don't use the matching suffix_n parameter, they alway use the value in the suffix parameter. This is the scheme used by English and a few other Germanic-related languages.
  • 'gendered-suffix' — based on the gender (m, f, n) the matching value in the suffix_gender parameter is written after the numeral as the ordinal indicator. If the matching suffix_gender parameter is not present or no gender is specified by the user, the value in the suffix parameter is written after the numeral as the ordinal indicator. This is the scheme used by the romance languages.
  • 'gendered-suffix-one' — A combination of 'gendered-suffix' and 'suffix-one'. If the numeral is 1, then based on the gender (m, f, n) the matching value in the suffix_1_gender parameter is written after the numeral as the ordinal indicator. If the matching suffix_1_gender parameter is not present or no gender is specified by the user, the value in the suffix_1 parameter is written after the numeral as the ordinal indicator. If the numeral is not 1, then based on the gender (m, f, n) the matching value in the suffix_gender parameter is written after the numeral as the ordinal indicator. If the matching suffix_gender parameter is not present or no gender is specified by the user, the value in the suffix parameter is written after the numeral as the ordinal indicator. This is the scheme used by the French language.
  • 'gendered-suffix-n' — An expansion of 'gendered-suffix-one'. If the numeral is n (where n <= 9), then based on the gender (m, f, n) the matching value in the suffix_n_gender parameter is written after the numeral as the ordinal indicator. If the matching suffix_n_gender parameter is not present or no gender is specified by the user, the value in the suffix_n parameter is written after the numeral as the ordinal indicator. If that is not present, the value in the matching value in the suffix_gender parameter is written after the numeral as the ordinal indicator. If the numeral is greater than 9, then based on the gender (m, f, n) the matching value in the suffix_gender parameter is written after the numeral as the ordinal indicator. If the matching suffix_gender parameter is not present or no gender is specified by the user, the value in the suffix parameter is written after the numeral as the ordinal indicator. This is the scheme used by the Catalan language.
  • 'mod10-gendered-suffix-skip-tens' — A combination of 'skip-tens' and 'gendered-suffix'. The value in the suffix_n_gender parameter is written after the numeral as the ordinal indicator if the final digit of the numeral is n and gender is gender. If the matching suffix_n_gender parameter is not present, or no gender is specified by the user, the value in the matching suffix_n parameter is written after the numeral as the ordinal indicator. If that is not present, the value in the matching value in the suffix_gender parameter is written after the numeral as the ordinal indicator. If that is not present, or no gender is specified by the user, the value in the suffix parameter is written after the numeral as the ordinal indicator. Numeral values in the range 10..19 only use gender. This is the scheme used by the Polish language.
  • 'uk-rules' — The Ukrainian rules, processed identically to 'mod10-gendered-suffix-skip-tens' with a special exception for when the final two digits are 40 or the number is a multiple of 1000. If the final two digits are 40, then based on the gender (m, f, n) the matching value in the suffix_40_gender parameter is written after the numeral as the ordinal indicator. If the matching suffix_40_gender parameter is not present or no gender is specified by the user, the value in the suffix parameter is written after the numeral as the ordinal indicator. If the number is a multiple of 1000, then based on the gender (m, f, n) the matching value in the suffix_1000_gender parameter is written after the numeral as the ordinal indicator. If the matching suffix_1000_gender parameter is not present or no gender is specified by the user, the value in the suffix parameter is written after the numeral as the ordinal indicator.
"https://si.wikibooks.org/w/index.php?title=Module:I18n/ordinal/doc&oldid=24468" වෙතින් සම්ප්‍රවේශනය කෙරිණි