Predloga: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 94 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 determined as of version 6.0, and should be complete & correct. That (upper) part of the list should not be changed unless for errors. An 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 build: 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.
See also
Splošne informacije o ISO 15924 predlogah
ISO posodobitve
ISO seznam se redno spreminja, zadnja leta v juniju in decembru. Trenutni seznam je od datuma Od 9. avgust 2011[update].Ta seznam vsebuje 160 definiranih kod (koda, številka, ime pisave).
- Note: pri razreševanju rdečih ali napačnih povezav ,uredite
{{ISO 15924/wp-name}}ali{{ISO 15924/wp-category}}. To je povezava med ISO kodo in napisanim Wikipedijinem člankom.
Viri
Glej tudi
Sklici
- ↑ http://www.unicode.org/iso15924/iso15924-codes.html
- ↑ http://www.unicode.org/iso15924/iso15924-text.html (downloadable flat textfile)
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.









