"ഫലകം:Lang/doc" എന്ന താളിന്റെ പതിപ്പുകൾ തമ്മിലുള്ള വ്യത്യാസം

(ചെ.)No edit summary
imported>Nnemo
Notably — Accessibility. More meaningful link.
വരി 1:
{{documentation subpage}}
 
The purpose of this template is to indicate that a given span of text belongs to a particular language (see [[language code]]). It often makes no visible changes to the text, but can help web browsers choose the right font, screen readers use the right pronunciation and more, as explained [[Template:Lang/doc#Rationale|belowas explained hereafter]].
 
<nowiki>{{</nowiki>lang|''Language tag''|''Text''}}
വരി 46:
Which results in your browser:
* Tajik ({{rtl-lang|tg-Arab|تاجیکی}}, {{transl|tg|''tojikī''}}, {{lang|tg-Cyrl|тоҷикӣ}})
Note the use of {{tl|rtl-lang}} instead of {{tl|lang}} when using the Arabic script (see belowhereafter section [[#Writing direction|writing direction]]).
 
==== Undetermined language ====
 
The <nowiki>{{</nowiki>lang}} template is not only used to specify the language of foreign words, but also to specify a single symbol or character in a specific script, for example when discussing about a specific writing system. Many times the character / symbol is used in several languages, but when the article refers to the [[grapheme]] itself the [[ISO 639‑2]] and [[ISO 639‑3]] language code <tt>und</tt> for Undetermined language. For example:
 
<pre>
വരി 87:
* Web browsers can use the information in such [[:Category:multilingual support templates|multilingual support templates]] to choose an appropriate font.
** This is great for [[CJK characters|CJK]] where a character can be given its language-specific shape but will fall back to another form if no appropriate font is found or if the preferred font lacks that character, for example because the language does not make use of that character: see [[Han Unification#Examples of language dependent characters]] and [[User:Wikipeditor/CJK|these comparison table and screen photo]].
* For [[web accessibility|accessibility]] [[screen reader]]s need language info. to speak text in the correct language—andlanguage — and to satisfy [[Wikipedia:Accessibility#Text|Wikipedia accessibility guidelines]].
* For [[spell checker]]s and grammar checkers.
* To help browsers choosing appropriate [[quotation mark]]s, and making decisions about [[Hyphen|hyphenation]], [[Typographic ligature|ligature]]s, and spacing.
വരി 110:
span[lang] { color: green; }
 
Do ''Do not'' use quotation marks in your user style sheet; wikitext will screw them up. They are recommended in CSS, but not required other than for font families containing generic-family keywords ('inherit', 'serif', 'sans-serif', 'monospace', 'fantasy', and 'cursive'). See http://www.w3.org/TR/CSS21/fonts.html#font-family-prop for details.
 
== See also ==
"https://ml.wikipedia.org/wiki/ഫലകം:Lang/doc" എന്ന താളിൽനിന്ന് ശേഖരിച്ചത്