সাঁচ:Lang/doc
This template uses a See H:DIVSPAN for details. |
Usage
সম্পাদনা কৰকThis template tags pieces of text with the appropriate language code and allows for the implementation of Web Fonts.
This template is a <span> template.
{{lang block}} is the <div> version of this template.
{{lang|language|text}}
{{lang | language = | text = | direction = | font = | style = | class = | attr = | inline = }}
Parameters
সম্পাদনা কৰক- language: (Also
lang
or the first unnamed parameter) The code for the language being displayed, using ISO 639 - text: (Also the second unnamed parameter) The text to be displayed.
- direction: (Also
dir
) Text direction, can beltr
(left-to-right) orrtl
(right-to-left). Left-to-right is standard; right-to-left is used for languages such as Arabic and Hebrew. If this is not set, the template will attempt to select the correct text direction based on the language parameter. - font: Uses the webfont extension. See Web Fonts below.
- style: The code for other optional CSS style being applied, such as
font-feature-setting: 'locl';
for localized glyph(s). - class: Any HTML classes to apply, such as
class="plainlinks"
. - attr: The code for other optional HTML attributes being applied
Internal parameters
সম্পাদনা কৰকThis parameter is for internal use only, to distiguish between {{lang}} and {{lang block}}.
It shall not be used directly.
- inline: The type of template:
inline=yes (default)
will provide an inline template (<span> ... </span>); this is used internally in {{lang}}.inline=no
(or != yes) will provide a block template (<div> ... </div>); this is used internally in {{lang block}}.
Examples
সম্পাদনা কৰকHebrew text and unnamed parameters
সম্পাদনা কৰক{{lang|he|ארץ זבת חלב ודבש}}
ארץ זבת חלב ודבש
The same text without this template: ארץ זבת חלב ודבש
Arabic text and named parameters
সম্পাদনা কৰক{{lang | language = ar | text = المدينة | dir = rtl }}
المدينة
Arabic text and non-standard web font
সম্পাদনা কৰক{{lang|ar|المدينة|font=Amiri}}
المدينة
Burmese text and different web fonts
সম্পাদনা কৰক{{lang|my|အကူအညီ}}
အကူအညီ
{{lang|my|အကူအညီ|font=Padauk-Regular}}
အကူအညီ
{{lang|my|အကူအညီ|font=Yunghkio}}
အကူအညီ
English text (Latin script) with web font
সম্পাদনা কৰক{{lang|text=Lorem ipsum|font=Rufscript}}
Lorem ipsum
{{lang|text=Lorem ipsum|font=Ubuntu}}
Lorem ipsum
{{lang|text=Lorem ipsum|font=UnifrakturMaguntia}}
Lorem ipsum
{{lang|en|Lorem ipsum|font=Linux Libertine}}
Lorem ipsum
Language attribute
সম্পাদনা কৰকAs stated under parameters, the language should be set with an ISO 639 language code.
However, if necessary, this can be specified even further with an ISO 15924 script code and/or an ISO 3166-1 country code. Script codes can be used if the text is in a script other than that associated with the language. Country codes can be used to specify the text's country of origin.
Use | Text | Attribute | Code | Notes |
---|---|---|---|---|
Language | Χαίρε, ω χαίρε Ελευθεριά! | el | {{lang|el|Χαίρε, ω χαίρε Ελευθεριά!}} |
Greek text. "el" = Greek language. |
Script | Haire, o haire, Eleftheria! | el-Latn | {{lang|el-Latn|Haire, o haire, Eleftheria!}} |
Transliterated into Latin script. "Latn" = Latin script. |
Country | Χαίρε, ω χαίρε Ελευθεριά! | el-GR | {{lang|el-GR|Χαίρε, ω χαίρε Ελευθεριά!}} |
Greek origin. "GR" = Greece. |
Script & Country | Haire, o haire, Eleftheria! | el-Latn-GR | {{lang|el-Latn-GR|Haire, o haire, Eleftheria!}} |
Greek language in Latin script from Greece. |
See IETF language tag on Wikipedia for more information. |
Web Fonts
সম্পাদনা কৰকThis template makes use of the Universal Language Selector extension installed on this project. This extension allows for the proper display of languages where the standard font is either unavailable or of insufficient quality.
The language
parameter will determine which font is used. In some cases, multiple fonts are available; the preferred font can be selected with the font
parameter. If the font
parameter is not used, the default font for that language will be selected. Currently no support for mobile devices.
Language | ISO-639 | Fonts |
---|---|---|
Ahirani | ahr | Lohit Devanagari |
Akkadian | akk | Akkadian |
Amharic | am | Abyssinica SIL |
Arabic (Naskh script) | ar | Amiri |
Scheherazade | ||
Lateef | ||
Nastaʿlīq script (Aran) | Hussaini Nastaleeq | |
Assamese | as | Lohit Assamese |
Bengali | bn | Lohit Bengali, Siyam Rupali |
Bhojpuri | bh | Lohit Devanagari |
Bishnupriya Manipuri | bpy | Lohit Bengali |
Buginese | bug | Saweri |
Burmese | my | Padauk-Regular |
Myanmar3 | ||
TharLon | ||
Yunghkio | ||
Dzongkha | dz | Jomolhari |
Gujarati | gu | Lohit Gujarati |
Hebrew | he | Alef |
Miriam CLM | ||
Taamey Frank CLM | ||
Biblical Hebrew | hbo | Taamey Frank CLM |
Hindi | hi | Lohit Devanagari |
Samyak Devanagari | ||
Kannada | kn | Lohit Kannada |
Kedage | ||
Khmer | km | Hanuman, KhmerOSbattambang, KhmerOS, Nokora, Suwannaphum |
Konkani | kok | Lohit Devanagari |
Latin script (Latn) | Charis SIL | |
ComicNeue | ||
Doulos SIL | ||
Gentium Plus | ||
Junicode | ||
Linux Libertine | ||
RailwaySans | ||
Rufscript | ||
Ubuntu | ||
Latin fraktur script (Latf) | UnifrakturMaguntia | |
Makassarese | mak | Saweri |
Malayalam | ml | AnjaliOldLipi |
Meera | ||
RaghuMalayalam | ||
Maithili | mai | Lohit Devanagari |
Marathi | mr | Lohit Devanagari |
Samyak Devanagari | ||
Min Dong Chinese | cdo | Charis SIL |
Doulos SIL | ||
Oriya (Odia) | or | Lohit Oriya |
Utkal | ||
Punjabi | pa | Lohit Punjabi |
Saab | ||
Persian (Farsi) | fa | IranianSans |
IranianSerif | ||
Sourashtra | saz | Pagul |
Sanskrit | sa | Lohit Devanagari, Samyak Devanagari |
Tamil | ta | Lohit Tamil |
Thendral | ||
Thenee | ||
Telugu | te | Lohit Telugu |
Pothana2000 | ||
Vemana2000 | ||
Tibetan | bo | BabelStone Tibetan Slim |
Tigrinya | ti | Abyssinica SIL |
Yi | yi | Nuosu SIL |
See here for a list of all available fonts. |
Language tagging
সম্পাদনা কৰকTexts on Wikisource should be tagged to specify the language in a machine readable format. All pages on English Wikisource are automatically tagged as "English". Any piece of text that is not in English should be tagged as such with this template or one of its derivatives.
Language tagging on Meta-Wiki explains the best practice of language tagging.
Blocks split across pages
সম্পাদনা কৰকFor blocks in a different language split across multiple pages, use {{lang block/s}} to begin the block and {{lang block/e}} to end it. {{lang block/s}} takes the same parameters as {{lang}} except for |inline=
, which is fixed as "no".
See also
সম্পাদনা কৰক- {{hebrew}}, {{Lang-he}} & {{GHGheb}}
- {{syriac}} & {{Lang-syc}}
- {{arabic}} & {{Lang-ara}}
- {{japanese}}
- {{armenian}}
- {{Lang-hbo}}
- {{Lang-sux}}
- {{Insular}}
- start-ISO 639 name-end
- {{blackletter}}