ഫലകം:Lang/വിവരണം

വിക്കിപീഡിയ, ഒരു സ്വതന്ത്ര വിജ്ഞാനകോശം.


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 hereafter.

{{lang|Language tag|Text}}

Use ISO 639 language codes. Example (where fr is the code for French):

* She said: "''{{lang|fr|Je suis française.}}''"

Results in your browser:

  • She said: "Je suis française."

This template also includes a categorisation link when used by main namespace pages, therefore it should not be included inside a wikilink. It should also not be used in the "title" parameter of a citation when a URL is present; this generates an error. This error may not be immediately obvious if it is used via another template namespace page. If appropriate, the entire wikilink may be fed to the template instead:

Good
{{lang|ar|[[Arabic language|العربية]]}}
Bad
[[Arabic language|{{lang|ar|العربية}}]]

By default, this template will place articles into the relevant subcategory of Category:Articles containing non-English-language text. To suppress this, add the parameter |nocat=true.

There are also versions of this template for specific languages that also print the language's name, intended to be used the first time that language is used in the article. For example, ഫലകം:J and ഫലകം:J give "Spanish: español" and "റഷ്യൻ: русский язык".

Language subtags can also be used to indicate the writing script or regional variant of a language. According to the W3C, "the golden rule when creating language tags is to keep the tag as short as possible", [1] so such subtags should only be added if there is an important reason to use them. ISO 639‑1 is preferred over ISO 639‑2 and ISO 639‑3.

Italics[തിരുത്തുക]

{{lang|xx}} outputs plain text by default. In {{lang-xx}}, the foreign-language text is italicised by default. If plain text is required, e.g. for proper names, {{noitalics}} may be used:

* ... the border town of Ventimiglia ({{lang-fr|{{noitalics|Vintimille}}}})

Gives:

  • ... the border town of Ventimiglia (French: Vintimille)

Indicating writing script[തിരുത്തുക]

If necessary, add the ISO 15924 code to indicate the script.

For example, Russian is usually written in the Cyrillic script, therefore the 'Cyrl' script code is superfluous and the language code will be ru instead of ru-Cyrl. However, when that text is transliterated the transl code (transliteration) should be used because it isn't the default script for Russian: ru-Latn. Example:

* Moscow ([[Russian language|Russian]]: {{lang|ru|Москва́}}, {{transl|ru|''Moskva''}})

which is the same as

* Moscow ({{lang-ru|Москва́}}, {{transl|ru|''Moskva''}})

Results in your browser:

Instead of using {{transl|ru|''Moskva''}} the {{lang|ru-Latn|''Moskva''}} can be used, but if you specified a font and a size for the target language in your custom CSS (see Help:User style), the transliteration will appear in that specified style. To specify a transliteration scheme, for example, you are using the ISO 9 transliteration of Cyrillic, use {{transl|ru|ISO|''Moskva''}}:

The IANA maintains a list specifying when the script tag should be suppressed [2]. In some cases, the script must be always specified, like Tajik which can be equally written in Arabic, Latin or Cyrillic alphabets:

* Tajik ({{rtl-lang|tg-Arab|تاجیکی}}, {{transl|tg|''tojikī''}}, {{lang|tg-Cyrl|тоҷикӣ}})

Which results in your browser:

  • Tajik (تاجیکی‎, tojikī, тоҷикӣ)

Note the use of {{rtl-lang}} instead of {{lang}} when using the Arabic script (see hereafter section writing direction).

Undetermined language[തിരുത്തുക]

The {{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 und for Undetermined language. For example:

The {{lang|und-Hani|字}} Han character has 6 strokes.
The Han character has 6 strokes.


Han characters are used in Chinese, Japanese, sometimes Korean, and formerly Vietnamese, and in this case the character is not used for any specific language. Note that the script code used is Hani, which specifies generic Han characters (Hanzi, Kanji, Hanja).

Compare {{script}}

The {{script|Hani|字}} Han character has 6 strokes.
The Han character has 6 strokes.

Indicating regional variant[തിരുത്തുക]

In some cases, maybe it will be needed to add ISO 3166-1 alpha-2 country codes (specific usage of that country). Of course the three codes can appear in the same tag, for example the code zh-Hant-TW will be used for Chinese text written with Traditional Han characters, containing words or expressions specific to Taiwan. zh-Hans is for simplified. Examples:

* {{lang|zh-Hant-TW|臺灣}}

Results in your browser:

  • 臺灣

Writing direction[തിരുത്തുക]

{{rtl-lang}} is a specific template for right-to-left languages like Arabic or Hebrew.

For right-to-left paragraphs (as opposed to rtl strings embedded in an English paragraph), use {{rtl-para}}.

Rationale[തിരുത്തുക]

Applying styles[തിരുത്തുക]

You can apply CSS styles in your user style sheet. Registered users can put styles into User:XXX/monobook.css, where XXX is the user name.

These examples may work in Internet Explorer 8; prior versions do not support attribute selectors. Alternatively, try another browser such as Firefox.

Example: to apply a font to Russian-language text:

 span[lang|=ru] { font-family: fonteskaya; }

Example: to apply a colour to text marked with any language:

 span[lang] { color: green; }

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.

TemplateData[തിരുത്തുക]

This is the TemplateData documentation for this template used by VisualEditor and other tools.

Lang

Indicate that a given span of text belongs to a particular language. Use by browsers which use different styles for different languages.

ഫലകത്തിനുള്ള ചരങ്ങൾ
ചരം വിവരണം തരം സ്വതേ സ്ഥിതി
Language code 1 An ISO 639 language codes, e.g. fr (the code for French). string ശൂന്യം ആവശ്യമാണ്
Text 2 The text e.g. Je suis française. string ശൂന്യം ആവശ്യമാണ്

See also[തിരുത്തുക]

References[തിരുത്തുക]

"http://ml.wikipedia.org/w/index.php?title=ഫലകം:Lang/വിവരണം&oldid=1892370" എന്ന താളിൽനിന്നു ശേഖരിച്ചത്