Predloga:Jezik

{{{2}}}

Dokumentacija za predlogo[poglej] [uredi] [zgodovina] [osveži]

The purpose of this template is to indicate that a span of text belongs to a particular language. It often makes no visible changes to the text, but can prompt web browsers to use a more appropriate font, or screen readers to use a particular kind of pronunciation, and so on. See § Rationale for more information.

Syntax and usageUredi

     {{jezik|language tag|text}}

The language tag should consist of an ISO 639 language code. The template supports properly formatted IETF language tags using subtags that identify the language's script, region, and/or variant. The ISO 639 language code is a two- or three-letter abbreviation, in lowercase, of the language's name. French, for example, has the code fr:

  • She said: "{{jezik|fr|Je suis française.}}" → She said: "Je suis française."

Because all languages represented by two-letter codes in ISO 639‑1 can also be represented by their three-letter equivalents in ISO 639‑2 and above, it is recommended to use the shortest language tag possible that sufficiently describes the target language.[1] So while French could be represented by 639‑2's fra code, use the 639‑1 code fr instead. Likewise, script, region, and variant information should be included only when they provide a necessary distinction. For an up-to-date list of available language, script, region, and variant codes, please refer to the IANA's language subtag registry.

By default, this template will place articles into the relevant subcategory of kat:Articles containing non-English-language text. To suppress this – e.g. when using {{lang}} within a wikilink or the title parameter of a citation – add the parameter |nocat=true.

FormattingUredi

Automatic italicsUredi

{{lang}} automatically applies italic styling when the text in {{{1}}} is written entirely in the Latn script:
{{jezik|fr|Je suis française.}}Je suis française.
''{{jezik|fr|Je suis française.}}''Je suis française. – external markup is ignored

When Latn script should not be italicized, there are multiple approaches:

|italic=no – renders {{{1}}} in upright font; italic markup around the template is ignored; italic markup inside the template causes an error message:
{{jezik|fr|Je suis française.|italic=no}}Je suis française.
''{{jezik|fr|Je suis française.|italic=no}}''Je suis française.
''{{jezik|fr|Je suis ''française''.|italic=no}}''Je suis française. – italic markup in conflict with |italic=no
|italic=unset – disables template-provided styling; {{{1}}} is styled according to external or internal wiki markup:
{{jezik|fr|Je suis française.|italic=unset}}Je suis française.
''{{jezik|fr|Je suis française.|italic=unset}}''Je suis française.
{{jezik|fr|''Je suis'' English.|italic=unset}}Je suis English.
{{noitalic}} can also be used:
{{jezik|fr|Je suis {{noitalic|English}}.}}Je suis English.