Template:Lang

From FlightGear wiki
Jump to: navigation, search

{{{2}}}

The following template description is not displayed when the template is inserted in an article.

Goal

This template can be used to indicate the language in a span of text to a web browser.

Note While the template can help web browsers find the right font and can help screen readers/text-to-speach browsers, it will usually not introduce a visual difference in the text.

Usage

{{lang|lang|text |rtl=}}

All parameters but rtl are mandatory.

lang
Two-letter ISO 639-1 language code for the language of the text.
text
Text in that language.
rtl
If non-empty the text will be marked as being read right-to-left.

Examples

"Have a wonderful day!" is in Swedish "{{lang|sv|Ha en underbar dag!}}".

"Have a wonderful day!" is in Swedish "Ha en underbar dag!".

Technical details

The template uses the HTML tag <span lang="" dir="rtl"> to mark that the piece text is in a different language than the rest of the page, and when rtl is non-empty also that the text is read right-to-left.

Related templates

  • {{language icon}} – Will indicate the language in a paragraph to both the reader and the web browser.