Template:Scriptname/c

From translatewiki.net
Jump to navigation Jump to search
Test Template Info-Icon - Version (2).svg
The documentation of Scriptname/doc this template is included from the Template:Scriptname/doc subpage (Edit)
Usage:
Utility to translate ISO 15924 script codes into their names.
Syntax:
{{Scriptname
| 1=script
| 2=lang
}}
Parameters:
  • 1=script (mandatory) – 4-letter code representing the script name, or 3-digit code, or Unicode alias (Basic English name with all words capitalized and glued by underscores) if the Unicode standard assigned one. The letter case of this parameter is not significant.
    This recognizes all ISO 15924 codes (whose letter case is not significant), including numeric codes, and aliases referenced by the Unicode Character Database (with capitalized initials and underscores as word separators).
  • 2=lang (optional) – A valid BCP 47 language tag into which the script name will be translated. Its letter case is not significant.
    The default empty value will return the script name in the UI language in the current user language selected in the UI, using {{UILANGCODE}}.
    If lang specifies only one letter, it is not a valid script code, but it allows querying info about the script:
    d returns the date of assignment of script codes in ISO 15924.
    c returns the canonical 4-letter code of the script in ISO 15924 (when performing a query on a 3-digit code, or Unicode alias).
    n returns the canonical 3-digit code of the script in ISO 15924 (when performing a query on a 4-letter code, or Unicode alias).
    u returns the Unicode version in which characters in the script was first encoded, or an empty string otherwise.
    n returns the Unicode alias of the script if it was encoded, or an empty string otherwise.
Examples:
  • ‹{{Scriptname|Latn}}› generates ‹Latin› (the script name translated in a user preferred language)
  • ‹{{Scriptname|Latn|en}}› generates ‹Latin› (the standard script name in English)
  • ‹{{Scriptname|Latn|fr}}› generates ‹latin› (the standard script name in French)
  • ‹{{Scriptname|215|c}}› generates ‹Latn› (the canonical 4-letter code for the script with this 3-digit code)
  • ‹{{Scriptname|Latin|c}}› generates ‹Latn› (the canonical 4-letter code for the script with this Unicode alias)
  • ‹{{Scriptname|Latn|d}}› generates ‹2004-05-01› (the date of first addition of the script in ISO 15924)
  • ‹{{Scriptname|Latn|u}}› generates ‹1.1› (the first Unicode version supporting that script)
  • ‹{{Scriptname|Latn|a}}› generates ‹Latin› (the Unicode alias for the script)
  • ‹{{Scriptname|Arab}}› generates ‹Arabic› (the standard script name in a user preferred language)
  • ‹{{Scriptname|Arab|en}}› generates ‹Arabic› (the standard script name in English)
  • ‹{{Scriptname|Arab|fr}}› generates ‹arabe› (the standard script name in French)
  • ‹{{Scriptname|Arab|ar}}› generates ‹عربية› (the standard script translated name in Arabic, is possible)
  • ‹{{Scriptname|Jamo|u}}› generates ‹1.1› (the first Unicode version supporting that script)
  • ‹{{Scriptname|Jamo|a}}› generates ‹› (the Unicode alias for the script)
  • ‹{{Scriptname|Cpmn|en}}› generates ‹Cypro-Minoan› (the English name of the script in ISO 15924)
  • ‹{{Scriptname|Cpmn|d}}› generates ‹2017-07-26› (the date of first addition of the script in ISO 15924)
  • ‹{{Scriptname|Cpmn|u}}› generates ‹› (the first Unicode version supporting that script)
  • ‹{{Scriptname|Cpmn|a}}› generates ‹› (the Unicode alias for the script)
  • ‹{{Scriptname|Nand|en}}› generates ‹Nandinagari› (the English name of the script in ISO 15924)
  • ‹{{Scriptname|Nand|d}}› generates ‹2018-08-26› (the date of first addition of the script in ISO 15924)
  • ‹{{Scriptname|Nand|u}}› generates ‹12.0› (the first Unicode version supporting that script)
  • ‹{{Scriptname|Nand|a}}› generates ‹Nandinagari› (the Unicode alias for the script)
Notes:
  • There's for now no translation data in MediaWiki for these script names, all translations are built in the template (including the names in English and French defined from the ISO standard itself).
Data source:
  • This template uses data matching exactly the official list of codes from ISO 15924. It is synchronized with the last published update on https://unicode.org/iso15924/codechanges.html (as of 2019-09-12, the last update was published on 2019-08-19 (with all scripts assigned in Unicode 13.0).
  • The following standard ISO 15924 codes are supported by this template, but these scripts are still not encoded in Unicode (so localisation of written text into one them is still not possible):
    |Afak|439 |Blis|550 |Cirt|291 |Cpmn|402 |Egyd|070 |Inds|610 |Jurc|510 |Kitl|505 |Kpel|436 |Leke|364 |Loma|437 |Maya|090 |Moon|218 |Nkdb|085 |Nkgb|420 |Phlv|133 |Piqd|293 |Roro|620 |Sara|292 |Shui|530 |Teng|290 |Visp|280 |Wole|480
  • So usable scripts for tagging languages are only those that have an Unicode version assigned. Most of them have an Unicode alias defined, except symbol-only scripts and scripts variants (or aliases for mixed scripts or subsets of scripts), whose usage may be subject to restrictions (only for use with some specific languages):
    |Aran|161 |Cyrs|221 |Hans|501 |Hant|502 |Latf|217 |Latg|216 |Syre|138 |Syrj|137 |Syrn|136 |Zsye|993 (aliases for script variants)
    |Hanb|503 |Hrkt|412 |Jamo|284 |Jpan|413 |Kore|287 (aliases for mixed scripts or subsets of scripts)
  • As well, all special script codes are not supported for translations on translatewiki.net (even if a few of them may have an Unicode alias meant to classify subsets of characters encoded or reserved in Unicode, but that may be used in any language written in any script) :
    |Qaaa|900, ..., |Qabx|949 (codes reserved for private use)
    |Zinh|994|Inherited |Zmth|995 |Zsym|996 |Zxxx|997 |Zyyy|998|Common |Zzzz|999|Unknown (special codes)
  • Not all theoretically possible scripts are supported on this wiki even if they are encoded in Unicode. All scripts encoded up to Unicode 9.0 have suitable fonts available with Unicode mappings. But several recently encoded scripts (including most scripts encoded in Unicode 10.0 or later except one) still don't have fonts freely available, most of them for historic scripts or scripts used by small minorities (without technical support to create and maintain such fonts, or still without technical specifications like OpenType to properly support their rendering layout), and as of 24 August 2019 this includes (unless new fonts are published):
    |Gonm|313 |Nshu|499 |Soyo|329 |Zanb|329 (scripts encoded in Unicode 10.0)
    |Dogr|328 |Gong|312 |Maka|366 |Medf|265 |Sogd|141 |Sogo|142 (scripts encoded in Unicode 11.0)
    |Elym|128 |Hmnp|451 |Nand|311 |Wcho|283 (scripts encoded in Unicode 12.0)
    |Chrs|109 |Diak|342 |Kits|288 |Yezi|192 (scripts encoded in Unicode 13.0)
  • See ISO 15924 for the complete data set.
Translation of script names
The names of scripts are partially generated from some of the following subtemplates, whose subpage matches a language code into which script codes will be converted to localized script names. Two languages (English and French) are complete and are not translations, but match exactly what is defined in the ISO 15924 standard and don't need fallbacks. The templates with one-letter subpages (a, c, d, n) are special and return information about a script, as described above, and they must match the ISO 15924 standard. Others are incomplete translations and will fallback to another language when needed, or to English or French. Variants of a base language are translated with the same template, which can use a switch of the full language code specified in the second parameter :
See also: