Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Lang/doc: Difference between revisions

Template page
No edit summary
Description added
Line 1: Line 1:
{{TemplateBox
{{TemplateBox
|1=1
  |1                 = 1
|1d=language code in [[:en:List of ISO 639-1 codes|ISO 639-1]] (two-letter) format
  |1label            = language code
|1stat=required
    |1label-de          = Sprachcodierung
|2=2
  |1d                 = used language code in {{W|1=List of ISO 639-1 codes|2=ISO 639-1|3=en}} (two-letter) format
|2d=text
    |1d-de              = Verwendete Sprachcodierung im {{W|1=ISO-3166-1-Kodierliste|2=ISO-3166-1|3=de}}-(Zwei-Buchstaben)-Format
|3=tag
  |1type              = line
|3d=HTML tag to use, can be div or span.
  |1def              =
|name=Lang
  |1stat             = required
|desc=This template is for example called from [[Template:Autotranslate|autotranslatable]] templates and is used to apply the "lang" and "xml:lang" attributes to the span tag containing the text. It also adds CSS classes, that for example allow CSS highlighting text that is in a specific language. For a list of language codes to use for parameter 1 see [[:en:List of ISO 639-1 codes]].
 
|namespace=all
  |2                 = 2
|usergroup=all
  |2label            = text
|usage-notes=
    |2label-de          = Text
|type=
  |2d                = Text in the used language code
|example=
    |2d-de              = Text in der verwendeten Sprachcodierung
|i18n-method=-
  |2type              = content
|i18n-desc=
  |2def              =  
|seealso={{tl|Language}}
  |2stat              = optional
|setscats=
 
|lines=one
  |3                 = tag
|shorthand=
  |3label            = HTML tag
|relieson=
    |3label-de          = HTML-Element
  |3d                 = Possible HTML tags:
;div : Text as a separate division
;span : Text within a text flow
    |3d-de              = Mögliche HTML-Elemente:
;div : Text als eigener Bereich
;span : Text innerhalb eines Textflusses
  |3type              = line
  |3def              = div
  |3stat              = optional-
 
  |name               = Lang
  |desc               = Using this template, a specific language code can be specified in the HTML code.
    |desc-de            = Mittels dieser Vorlage kann ein bestimmter Sprachecode im HTML-Code festgelegt warden.
  |namespace          = all
  |usergroup          = all
  |placement          =
  |usage-notes        = {{LangSwitch
|en=This template is for example called from [[Template:Autotranslate|autotranslatable]] templates and is used to apply the “lang” and “xml:lang” attributes to the span tag containing the text. It also adds CSS classes, that for example allow CSS highlighting text that is in a specific language. For a list of language codes to use for parameter 1 see {{W|1=List of ISO 639-1 codes|3=en}}.
|de=Diese Vorlage wird beispielsweise von der [[Template:Autotranslate|Vorlage:Autotranslate]] aufgerufen und wird verwendet, um den Sprachcode auf die Attribute „lang” und „xml:lang” anzuwenden. Es kann zwischen den HTML-Tags „span” und „div” gewählt werden. Es fügt auch CSS-Klassen hinzu, die zum Beispiel das Hervorheben von Text in einer bestimmten Sprache erlauben. Die Liste für den in Parameter 1 zu verwendenden Sprachcodes ist unter {{W|1=ISO-3166-1-Kodierliste|3=de}} zu finden.
|de-ch=Diese Vorlage wird beispielsweise von der [[Template:Autotranslate|Vorlage:Autotranslate]] aufgerufen und wird verwendet, um den Sprachcode auf die Attribute «lang» und «xml:lang» anzuwenden. Es kann zwischen den HTML-Tags «span» und «div» gewählt werden. Es fügt auch CSS-Klassen hinzu, die zum Beispiel das Hervorheben von Text in einer bestimmten Sprache erlauben. Die Liste für den in Parameter 1 zu verwendenden Sprachcodes ist unter {{W|1=ISO-3166-1-Kodierliste|3=de}} zu finden.
}}
}}
  |type              = formatting
  |example            = 1=de{{!}}2=Dies ist ein Beispiel.{{!}}tag=span
  |example-value      = {{Lang|1=de|2=Dies ist ein Beispiel.|tag=span}}
  |i18n-method        = -
  |seealso            =
* {{tl|Language}}
  |setscats          =
  |print              = one
  |shorthand          =
  |relieson          =
}}

Revision as of 17:47, 12 June 2018

Using this template, a specific language code can be specified in the HTML code.

Usage

{{Lang |1= |2= }}

This template is for example called from autotranslatable templates and is used to apply the “lang” and “xml:lang” attributes to the span tag containing the text. It also adds CSS classes, that for example allow CSS highlighting text that is in a specific language. For a list of language codes to use for parameter 1 see List of ISO 639-1 codes.

Template parameters

ParameterDescriptionDefaultStatus
1language codeused language code in ISO 639-1 (two-letter) formatemptyrequired
2textText in the used language codeemptyoptional
tagHTML tagPossible HTML tags:
div
Text as a separate division
span
Text within a text flow
divoptional

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users

Example

{{Lang|1=de|2=Dies ist ein Beispiel.|tag=span}}

renders as:

Dies ist ein Beispiel.

See also

Localization

This template is not intended to be localized.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.