Template:Scriptname/doc
![](https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Test_Template_Info-Icon_-_Version_%282%29.svg/50px-Test_Template_Info-Icon_-_Version_%282%29.svg.png)
This is the documentation subpage for the parent Template:Scriptname page.
- 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 (in the fixed format yyyy-mm-dd, as defined by the ISO 8601 standard) of assignment or last change of the script 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.a
returns the Unicode alias of the script if it was encoded, or an empty string otherwise.r
returns the Unicode standard reference chapter and section number describing the script if it was encoded, or an empty string otherwise.s
returns the text direction of the script (when written with the horizontal direction), eitherltr
for left-to-right,rtl
for right-to-left, or an empty string for special script codes with inherited or unspecified direction.t
returns the typology of the script.q
returns Wikidata QID of the element describing script, or an empty string otherwise.
- The default empty value will return the script name in the UI language in the current user language selected in the UI, using
- Examples for translating names of specified scripts:
‹{{Scriptname|Latn|en}}›
generates ‹Latin› (the standard English script name in ISO 15924)‹{{Scriptname|Latn|fr}}›
generates ‹latin› (the standard French script name in ISO 15924)‹{{Scriptname|Latn}}›
generates ‹Latin› (the script name translated in a user preferred language)‹{{Scriptname|Arab|en}}›
generates ‹Arabic› (the standard English script name in ISO 15924)‹{{Scriptname|Arab|fr}}›
generates ‹arabe› (the standard French script name in ISO 15924)‹{{Scriptname|Arab}}›
generates ‹Arabic› (the script name translated in a user preferred language)‹{{Scriptname|Arab|ar}}›
generates ‹عربية› (the script name translated in Arabic, if possible)‹{{Scriptname|Arab|fa}}›
generates ‹عربی› (the script name translated in Farsi, if possible)‹{{Scriptname|Arab|tg}}›
generates ‹арабӣ / arabī› (the script name translated in Tajik, if possible)‹{{Scriptname|Arab|tg-Arab}}›
generates ‹Arabic› (the script name translated in Tajik (Arabic script), if possible)‹{{Scriptname|Arab|tg-Cyrl}}›
generates ‹Arabic› (the script name translated in Tajik (Cyrillic script), if possible)‹{{Scriptname|Arab|tg-Latn}}›
generates ‹Arabic› (the script name translated in Tajik (Latin script), if possible)‹{{Scriptname|Arab|ur}}›
generates ‹عربی› (the script name translated in Urdu, if possible)‹{{Scriptname|Cpmn|en}}›
generates ‹Cypro-Minoan› (the standard English name of the script in ISO 15924)‹{{Scriptname|Nand|en}}›
generates ‹Nandinagari› (the standard English name of the script in ISO 15924)‹{{Scriptname|Java|jv-java}}›
generates ‹ꦲꦤꦕꦫꦏ› (the script name translated in Javanese (Javanese script), if possible)
- Examples for getting other infos for specified scripts:
‹{{Scriptname|215|c}}›
generates ‹Latn› (the canonical 4-letter code for the script with this 3-digit code)‹{{Scriptname|jamo|c}}›
generates ‹Jamo› (the canonical 4-letter code for the script with this script code)‹{{Scriptname|Latin|c}}›
generates ‹Latn› (the canonical 4-letter code for the script with this Unicode alias)‹{{Scriptname|Nandinagari|c}}›
generates ‹Nand› (the canonical 4-letter code for the script with this Unicode alias)‹{{Scriptname|Cypro_Minoan|c}}›
generates ‹Cpmn› (the canonical 4-letter code for the script with this Unicode alias)‹{{Scriptname|jamo|n}}›
generates ‹284› (the canonical 3-digit code for the script with this script code)‹{{Scriptname|Latin|n}}›
generates ‹215› (the canonical 3-digit code for the script with this Unicode alias)‹{{Scriptname|Nandinagari|n}}›
generates ‹311› (the canonical 3-digit code for the script with this Unicode alias)‹{{Scriptname|Cypro_Minoan|n}}›
generates ‹402› (the canonical 3-digit code for the script with this Unicode alias)‹{{Scriptname|Latn|d}}›
generates ‹2004-05-01› (the date of assignment or last change of the script in ISO 15924)‹{{Scriptname|Jamo|d}}›
generates ‹2016-01-19› (the date of assignment or last change of the script in ISO 15924)‹{{Scriptname|Nand|d}}›
generates ‹2018-08-26› (the date of assignment or last change of the script in ISO 15924)‹{{Scriptname|Cpmn|d}}›
generates ‹2017-07-26› (the date of assignment or last change of the script in ISO 15924)‹{{Scriptname|Latn|u}}›
generates ‹1.1› (the first Unicode version supporting that script)‹{{Scriptname|Jamo|u}}›
generates ‹1.1› (the first Unicode version supporting that script)‹{{Scriptname|Nand|u}}›
generates ‹12.0› (the first Unicode version supporting that script)‹{{Scriptname|Cpmn|u}}›
generates ‹14.0› (the first Unicode version supporting that script)‹{{Scriptname|Latn|a}}›
generates ‹Latin› (the Unicode alias for the script)‹{{Scriptname|Nand|a}}›
generates ‹Nandinagari› (the Unicode alias for the script)‹{{Scriptname|Cpmn|a}}›
generates ‹Cypro_Minoan› (the Unicode alias for the script)‹{{Scriptname|Zinh|a}}›
generates ‹Inherited› (the Unicode alias for the script, special)‹{{Scriptname|Zzzz|a}}›
generates ‹Unknown› (the Unicode alias for the script, special)‹{{Scriptname|Latf|a}}›
generates ‹› (the Unicode alias for the script, none as it is an unified variant of Latin)‹{{Scriptname|Jamo|a}}›
generates ‹› (the Unicode alias for the script, none as it is only a subset of Hangul)‹{{Scriptname|Jpan|a}}›
generates ‹› (the Unicode alias for the script, none as it is a mix of several scripts)‹{{Scriptname|Qaaa|a}}›
generates ‹› (the Unicode alias for the script, none as it is not an identifiable script)‹{{Scriptname|Latn|r}}›
generates ‹7.1› (the Unicode standard reference chapter and section number describing the script)‹{{Scriptname|Latf|r}}›
generates ‹7.1› (the Unicode standard reference chapter and section number describing the script, identical to Latn as the script variant is unified with it)‹{{Scriptname|Hani|r}}›
generates ‹18.1› (the Unicode standard reference chapter and section number describing the script)‹{{Scriptname|Hans|r}}›
generates ‹18.1› (the Unicode standard reference chapter and section number describing the script, identical to Hani as the script subset is unified with it)‹{{Scriptname|Hanb|r}}›
generates ‹18.1› (the Unicode standard reference chapter and section number describing the script, identical to Hani as the script is mixed in it)‹{{Scriptname|Qaaa|r}}›
generates ‹› (the Unicode standard reference chapter and section number describing the script, none as it is not identified and not encodable in the standard)‹{{Scriptname|Latn|s}}›
generates ‹ltr› (left-to-right)‹{{Scriptname|Arab|s}}›
generates ‹rtl› (right-to-left)‹{{Scriptname|Qaaa|s}}›
generates ‹—› (unspecified direction)‹{{Scriptname|Zinh|s}}›
generates ‹—› (unspecified direction)‹{{Scriptname|Zzzz|s}}›
generates ‹—› (unspecified direction)‹{{Scriptname|Latn|t}}›
generates ‹alphabet, bicameral›‹{{Scriptname|Geor|t}}›
generates ‹alphabet, unicameral›‹{{Scriptname|Deva|t}}›
generates ‹abugida, joining›‹{{Scriptname|Taml|t}}›
generates ‹abugida›‹{{Scriptname|Hebr|t}}›
generates ‹abjad›‹{{Scriptname|Arab|t}}›
generates ‹abjad, joining›‹{{Scriptname|Hira|t}}›
generates ‹simple syllabary›‹{{Scriptname|Jamo|t}}›
generates ‹alphabet, unicameral, featural composition, vertically not rotated top-to-bottom on right-to-left columns›‹{{Scriptname|Hani|t}}›
generates ‹logosyllabary, vertically not rotated top-to-bottom on right-to-left columns›‹{{Scriptname|Inds|t}}›
generates ‹undeciphered›‹{{Scriptname|Qaaa|t}}›
generates ‹special›‹{{Scriptname|Latn|q}}›
generates ‹Q8229›‹{{Scriptname|Qaaa|q}}›
generates ‹Q109986276›
- 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 2023-02-26, the last update was published on 2021-12-03, including scripts that were first encoded in Unicode 14.0 on 2021-09-21 and in Unicode 15.0 on 2022-09-13).
- 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 |Egyd|070 |Egyh|060 |Inds|610 |Jurc|510 |Kitl|505 |Kpel|436 |Leke|364 |Loma|437 |Maya|090 |Moon|218 |Nkdb|085 |Nkgb|420 |Pcun|015 |Pelm|016 |Phlv|133 |Piqd|293 |Psin|103 |Ranj|303 |Roro|620 |Sara|292 |Shui|530 |Sunu|274 |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 |Qaab|901 ... |Qaay|924 |Qaaz|925 |Qaba|926 |Qabb|927 ... |Qabw|948 |Qabx|949 (codes reserved for private use)
- |Root |True (reserved exceptionally for special use in CLDR, without equivalent numeric codes)
- |Zinh|994|Inherited |Zmth|995 |Zsye|993 |Zsym|996 |Zxxx|997 |Zyyy|998|Common |Zzzz|999|Unknown (special generic codes)
- Not all theoretically possible scripts are supported on this wiki even if they are encoded in Unicode. All scripts encoded up to Unicode 15.0 have now suitable fonts available with Unicode mappings. But several recently encoded scripts (including scripts to be encoded after the last released version 15.0 of Unicode) may still have no 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 23 February 2023 this no longer include any script.
- 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, r, u) are special and return information about a script, as described above, and they must match the ISO 15924 standard. Others are best-effort translations (possibly incomplete, will fallback to another language when needed, or to English or French). Variants of a base language (such as those listed in italic below) are translated with the same template, which can use a switch of the full language code specified in the second parameter (if needed these can be specialized by overwriting the redirect, and editing Template:Scriptname that provide direct fallbacks) :
- Scriptname/a
- Scriptname/af
- Scriptname/am
- Scriptname/ar
- Scriptname/ar-latn
- Scriptname/as
- Scriptname/az
- Scriptname/be
- Scriptname/bg
- Scriptname/bn
- Scriptname/bo
- Scriptname/c
- Scriptname/ca
- Scriptname/crh-ro
- Scriptname/cs
- Scriptname/d
- Scriptname/da
- Scriptname/de
- Scriptname/doc
- Scriptname/doc/header
- Scriptname/doc/row
- Scriptname/doc/row-optimized
- Scriptname/dv
- Scriptname/el
- Scriptname/en
- Scriptname/es
- Scriptname/et
- Scriptname/eu
- Scriptname/ext
- Scriptname/fa
- Scriptname/fi
- Scriptname/fr
- Scriptname/gl
- Scriptname/gu
- Scriptname/he
- Scriptname/hi
- Scriptname/hu
- Scriptname/hy
- Scriptname/id
- Scriptname/ii
- Scriptname/it
- Scriptname/ja
- Scriptname/jv-java
- Scriptname/ka
- Scriptname/km
- Scriptname/kn
- Scriptname/ko
- Scriptname/ku
- Scriptname/ky
- Scriptname/la
- Scriptname/lo
- Scriptname/lt
- Scriptname/lv
- Scriptname/mi
- Scriptname/mk
- Scriptname/ml
- Scriptname/mn
- Scriptname/mnw
- Scriptname/mr
- Scriptname/my
- Scriptname/n
- Scriptname/ne
- Scriptname/nl
- Scriptname/no
- Scriptname/nqo
- Scriptname/or
- Scriptname/pa
- Scriptname/pl
- Scriptname/pt
- Scriptname/q
- Scriptname/r
- Scriptname/ro
- Scriptname/ru
- Scriptname/s
- Scriptname/sh-cyrl
- Scriptname/sh-latn
- Scriptname/si
- Scriptname/sk
- Scriptname/sl
- Scriptname/sq
- Scriptname/sv
- Scriptname/t
- Scriptname/ta
- Scriptname/te
- Scriptname/tg
- Scriptname/th
- Scriptname/tk
- Scriptname/tl
- Scriptname/tr
- Scriptname/u
- Scriptname/uk
- Scriptname/ur
- Scriptname/vi
- Scriptname/wo
- Scriptname/zh-hans
- Scriptname/zh-hant
- Scriptname/zh-latn
- See also: