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
No edit summary
Line 1: Line 1:
{{Heavily used template|very=1}}
{{TemplateBox
{{TemplateBox
  |1                 = 1
|1=1
  |1label            = language code
|1d=language code
    |1label-de          = Sprachcodierung
|1stat=required
  |1d                 = used language code in {{W|1=List of ISO 639-1 codes|2=ISO 639-1|3=en}} (two-letter) format
|2=2
    |1d-de              = Verwendete Sprachcodierung im {{W|1=ISO-3166-1-Kodierliste|2=ISO-3166-1|3=de}}-(Zwei-Buchstaben)-Format
|2d=text
  |1type              = line
|name=Lang
  |1def              =
|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]].
  |1stat             = required
|namespace=all
 
|usergroup=all
  |2                 = 2
|usage-notes=
  |2label            = text
|type=
    |2label-de          = Text
|example=
  |2d                = Text in the used language code
|i18n-method=-
    |2d-de              = Text in der verwendeten Sprachcodierung
|i18n-desc=
  |2type              = content
|seealso=
  |2def              =
|setscats=
  |2stat              = optional
|lines=one
<!--
|shorthand=
  |3                  = tag
|relieson=
  |3label            = HTML tag
    |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 werden.
  |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” attribute 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.
  |example-value      = {{Lang|1=de|2=Dies ist ein Beispiel.}}
  |i18n-method        = -
  |seealso            =
* {{tl|Language}}
  |setscats          =
  |print              = one
  |shorthand          =
  |relieson          =
}}

Revision as of 04:34, 29 November 2022

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 en:List of ISO 639-1 codes.

Usage

{{Lang |1= |2= }}

Template parameters

ParameterDescriptionDefaultStatus
1language codeemptyrequired
2textemptyoptional

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

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.