This template should not be used in citation templates such as Citation Style 1 and Citation Style 2, because it includes markup that will pollute the COinS metadata they produce; see Wikipedia:COinS. |
This template uses Lua: |
Language templates |
---|
Language names (ISO 639) |
|
Interwiki links |
Foreign-language text |
|
Other |
|
The purpose of this template is to indicate that two spans of text belong to Serbo-Croatian; one in non-Latin script and the other in a Latin script that is not a transliteration or romanization of the non-Latin text. This template finds application with languages that have native alphabets that are equal in status; Serbo-Croatian for example. This template is a wrapper template that uses {{lang-x2}}
Syntax and usage
The minimal implementation has the form:
{{Lang-sh-Cyrl-Latn|<non-Latin text>|<Latin text>}}
where the two required parameters are:
<Latin text>
– the Latin-script text; must be written only using Latin Unicode characters<non-Latin text>
– the non-Latin-script text; must not be written using Latin Unicode characters
By default, this template will place articles into the relevant subcategory of Category:Articles containing non-English-language text.
Parameters
In addition to the two required positional parameters, this template accepts one other positional parameter and several named parameters that are the same as or similar to those supported by {{lang}}
and {{lang-??}}
.
{{{3}}}
– the third positional parameter is the translation of<Latin text>
and<non-Latin text>
|cat=
– takes the valueno
to inhibit language categorization; inverse of|nocat=yes
|italic1=
– italic control for the<non-Latin text>
; see Template:Lang § Parameters for details|italic2=
– italic control for the<Latin text>
|label=
– label to be used instead of template-provided language label; may be wikilinked; special keywordnone
causes the template to render without a label|link=
– takes the valueno
to prevent the language-name label from being linked;|link=no
does not unlink wikilinked labels set by|label=
|nocat=
– takes the valueyes
to inhibit language categorization; inverse of|cat=no
|region1=
– used to create an IETF language tag for the<non-Latin text>
; see Template:Lang § Parameters|region2=
– used to create an IETF language tag for the<Latin text>
|script1=
– used to create an IETF language tag for the<non-Latin text>
; see Template:Lang § Parameters|script2=
– used to create an IETF language tag for the<Latin text>
|variant1=
– used to create an IETF language tag for the<non-Latin text>
; see Template:Lang § Parameters|variant2=
– used to create an IETF language tag for<Latin text>
There is one unique parameter:
|separator=
– accepts,
(comma; default),;
(semicolon),/
(solidus), or a quoted string of text; see §Examples
Examples
The basic form:
{{Lang-sh-Cyrl-Latn|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ)}}
- Serbo-Croatian: Савез комуниста Југославије (CKJ), Savez komunista Jugoslavije (SKJ)
to use a different separator, use |separator=/
:
{{Lang-sh-Cyrl-Latn|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ) |separator=/}}
- Serbo-Croatian: Савез комуниста Југославије (CKJ)/Savez komunista Jugoslavije (SKJ)
the same but with spaces around the solidus, use |separator=" / "
:
{{Lang-sh-Cyrl-Latn|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ) |separator=" / "}}
- Serbo-Croatian: Савез комуниста Југославије (CKJ) / Savez komunista Jugoslavije (SKJ)
templates may include quote marks in their output so when using a template in |separator=
, make sure that the wrapping quote marks are of the other flavor
{{red|or}}
→<span style="color: red;">or</span>
so write:
{{Lang-sh-Cyrl-Latn|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ) |separator=' {{red|or}} '}}
- Serbo-Croatian: Савез комуниста Југославије (CKJ) or Savez komunista Jugoslavije (SKJ)
fidget with italics:
{{Lang-sh-Cyrl-Latn|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ) |italic1=yes |italic2=no}}
- Serbo-Croatian: Савез комуниста Југославије (CKJ), Savez komunista Jugoslavije (SKJ)
to create IETF language tags for the html:
{{Lang-sh-Cyrl-Latn|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ) |script1=Cyrl |script2=Latn}}
- Serbo-Croatian: Савез комуниста Југославије (CKJ), Savez komunista Jugoslavije (SKJ)
[[Serbo-Croatian language|Serbo-Croatian]]: <span lang="sh-Cyrl">Савез комуниста Југославије (CKJ)</span>, <span title="Serbo-Croatian-language text"><i lang="sh-Latn">Savez komunista Jugoslavije (SKJ)</i></span>
- Serbo-Croatian: Савез комуниста Југославије (CKJ), Savez komunista Jugoslavije (SKJ)
to hide the automatic language label, use |label=none
:
{{Lang-sh-Cyrl-Latn|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ) |label=none}}
- Савез комуниста Југославије (CKJ), Savez komunista Jugoslavije (SKJ)
to use a different label, use |label=
:
{{Lang-sh-Cyrl-Latn|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ) |label=[[League of Communists of Yugoslavia]]}}
- League of Communists of Yugoslavia: Савез комуниста Југославије (CKJ), Savez komunista Jugoslavije (SKJ)
to unlink the automatic language label, use |link=no
:
{{Lang-sh-Cyrl-Latn|Савез комуниста Југославије (CKJ)|Savez komunista Jugoslavije (SKJ) |link=no}}
- Serbo-Croatian: Савез комуниста Југославије (CKJ), Savez komunista Jugoslavije (SKJ)
to include a translation:
{{Lang-sh-Cyrl-Latn|Југословенска ратна морнарица|Jugoslavenska ratna mornarica|Yugoslav War Navy}}
- Serbo-Croatian: Југословенска ратна морнарица, Jugoslavenska ratna mornarica, lit. 'Yugoslav War Navy'
Error messages
This template calls {{lang}}
and the appropriate {{lang-??}}
templates. When those templates encounter errors, they will render their own error messages; for assistance, see the help text linked from their error messages.
There are error messages unique to this template. These are:
- missing a required argument – one or more of
<non-Latin text>
or<Latin text>
is missing or empty; both are required - <text1> is Latin script –
<non-Latin text>
must not be Latin-script text - <text2> is not Latin script –
<Latin text>
must be Latin-script text
Tracking categories
- Category:Lang and lang-xx template errors (1,257)
- Category:Lang and lang-xx code promoted to ISO 639-1 (1)
- Category:Lang and lang-xx using deprecated ISO 639 codes (8)
See also
- {{lang-sh-Latn-Cyrl}} – first parameter Latin, second Cyrillic
- {{lang-sh-Latn}} – one parameter Latin
- {{lang-sh-Cyrl}} – one parameter Cyrillic
- {{Lang-x2}} – generic form of this template
- Category:Wikipedia multilingual support templates