टेम्पलेट:ISO 15924 direction
Usage
[संपादन करीं]The template returns, for an ISO script code, the direction rtl, ltr, ttb, inh, mixed, or <blank>
.
{{ISO 15924 direction|Hebr}}
→ rtl{{ISO 15924 direction|Latn}}
→ ltr
Options
[संपादन करीं]The output texts rtl, ltr, ttb, mixed, inh, or <blank>
:
{{ISO 15924 direction|Hebr|ltr=left-to-right|rtl=right-to-left}}
→ right-to-left
{{ISO 15924 direction|Mong|ttb=top-to-bottom}}
→ top-to-bottom
{{ISO 15924 direction|Zyyy|ltr=left-to-right|rtl=right-to-left|mixed=both directions|default=unknown}}
→ both directions
Output <blank> (meaning: unknown) can be set to show any text:
{{ISO 15924 direction|Mang|default=unknown}}
→ unknown
How is it determined
[संपादन करीं]The direction is determined as follows.
- First, if a script is present in Unicode, Unicode Bidi-direction is derived for that Unicode script.
There are 137 scripts in Unicode (those ISO codes that have an alias). All regular scripts have a single "Strong" in Unicode direction. That is, all characters in a Unicode script that are "Strong", have the same directionality: either right-to-left (rtl) or left-to-right (ltr). Within a script there are no opposing directions present. There can be characters with "Weak" or "Neutral" direction (i.e., direction through context), but these do not alter other characters diretionality. One exception: script "Zyyy" conatains characters with either direction. Therefor, Zyyy has direction "mixed".
- Second, all other scripts, that are not defined in Unicode, can have their direction set manually in this template.
How to add a script direction
[संपादन करीं]The Unicode scripts are current as of version 9.0, and should be complete & correct. That (upper) part of the list should not be changed unless for errors. Script directionality can be added:
| <!-- end of Unicode-determined --> | Abcd | Defg = {{{ltr|ltr}} | Pqrs | Tuvw = {{{rtl|rtl}} | #default={{{default|}}}
The parameters as shown keep the output text option available.
Background
[संपादन करीं]For scripts in Unicode, the direction is determined as follows. Each character in a script (say Hebr) has a single property bidi-type. The value of that bidi-type is from a list, and its usage is described in the Unicode Bidi Algorithm (UAX#9).
The bidi-type can determine the direction, which can be a Strong, Neutral or Weak one. Strong directions are independent, like for the Latin alphabet A-Z. Neutral and Weak directions are dependent on context (think nearby other characters), and are used e.g. with decimals, diacritics and punctuation marks.
Within the character set of a script (e.g. Hebr=Hebrew script has 133 characters in Unicode), there are Strong characters, all are right-to-left. Other characters are Neutral, and so have not direction by their own. This is true for all (but one) scripts in Unicode: within a script, all Strong directions are the same.
From there this templates is built: All scripts in Unicode (but one exception, see below) have a single Strong direction. That direction is used here in this template. The exception is: Zyyy, Common, which is a collection of various characters that can be of either direction.
इहो देखल जाय
[संपादन करीं]General information on ISO 15924 templates
[संपादन करीं]Maintenance
[संपादन करीं]Item | Publisher | Details | Example | Definition in template | Usage in page | Notes | |
---|---|---|---|---|---|---|---|
Code | ISO 15924 | Alpha-4 | Arab | {{ISO 15924 code}} | {{ISO 15924/footer}}, /doc | ||
Number | ISO 15924 | Range 000–999 | 234 | {{ISO 15924 number}} | |||
Name | ISO 15924 | Descriptive name | {{ISO 15924 name}} | ISO name can differ from Unicode (alias) name | |||
Alias1 | ISO 159242 | Script name as used in Unicode | Arabic | {{ISO 15924 alias}} | |||
Script direction | Unicode | Can vary per character, but all Unicode scripts (so far) have a single main direction |
rtl | {{ISO 15924 direction}} | |||
WP-name | en:Wikipedia | WP content page name for the script | Arabic script | {{ISO 15924/wp-name}} | |||
WP-category | en:Wikipedia | WP category name for the script | Arabic script | {{ISO 15924/wp-category}} | Category:Arabic script | ||
Userbox | en:Wikipedia | Userbox demonstrating knowledge of a script | {{User iso15924}} | User boxes | |||
Script example character |
en:Wikipedia | Example character in userboxes | ع | {{ISO 15924/script-example-character}} | User boxes | e.g. Category:User Arab | |
Overview & relation ISO – Unicode |
en:Wikipedia | {{ISO 15924 script codes and related Unicode data}} | |||||
Redirect | en:Wikipedia | Redirect template | {{R from ISO 15924 code}} | Redirects | |||
Overview | en:Wikipedia | Overview for templates check | {{ISO 15924/overview}} | ||||
Subpages | en:Wikipedia | list | Special:PrefixIndex/Template:ISO_15924 | ||||
|
ISO updates
[संपादन करीं]The ISO 15924 list of script codes is updated regularly, usually at least once a year. The current list is complete 19 जनवरी 2016 तक ले [update], and defines 182 codes (code, number, script name).
- Note: when resolving red links or wrong links, edit
{{ISO 15924/wp-name}}
or{{ISO 15924/wp-category}}
. That is where the connection between ISO code and Wikipedia names is made.
Sources
[संपादन करीं]इहो देखल जाय
[संपादन करीं]References
[संपादन करीं]- ↑ http://www.unicode.org/iso15924/iso15924-codes.html
- ↑ http://www.unicode.org/iso15924/iso15924-text.html (downloadable flat textfile)
परिचय खातिर ऊपर दिहल गइल बिबरनलेख के टेम्पलेट:ISO 15924 direction/doc से ट्रांसक्लूड क के इहाँ देखावल जा रहल बाटे। (संपादन करीं | इतिहास देखीं) संपादक लोग एह टेम्पलेट के अभ्यासपन्ना (सैंडबाक्स) (बनाईं | मिरर करीं) आ टेस्टकेस (बनाईं) पन्ना सभ पर अभ्यास आ प्रयोग (टेस्टिंग) क सकत बाटे। अनुरोध बा कि अगर श्रेणी जोड़े के होखे तब /doc उपपन्ना (सबपेज) पर जोड़ल जाय। एह टेम्पलेट के उपपन्ना (सबपेज) देखीं। |