Nodyn:Lang/doc

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.

{{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 hyperlink. This error may not be immediately obvious if it is used via another template namespace page. If appropriate, the entire hyperlink may be fed to the template instead: {{lang|ar|[[Arabic language|العربية]]}}.

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, "{{lang-es|Español}}" and "{{lang-ru|русский язык}}" gives "Sbaeneg: Español" and "Rwsieg: русский язык".

Language subtags can also be used to indicate writing script or regional variation 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.


From Wikipedia, the free encyclopedia · View on Wikipedia

Developed by Nelliwinne