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 promptweb 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.
{{lang|fr|Je suis française.|italic=no}} →Je suis française.
''{{lang|fr|Je suis française.|italic=no}}'' →Je suis française.
''{{lang|fr|Je suis ''française''.|italic=no}}'' →[Je suisfrançaise.]Error: {{Lang}}: text has italic markup (help) – италик куцалъул конфликт лӀугьуна|italic=no параметргун.
specifies font size of the content intext; use a value suitable for use with the CSSfont-size property; this should almost always be a relative value supplied inХалип:Mxt orХалип:Mxt units, not a fixedpx value.
–
nocat
inhibits automatic categorization; mirror version ofcat; accepted values are:yes,y,true,t,on,1
–
cat
inhibits automatic categorization; mirror version ofnocat; accepted values are:no,n,false,f,off,0
{{lang}} uses the Lua functionlang()Module:Lang. That module also supports all of the{{lang-??}} templates using the Lua functionslang_xx_inherit() andlang_xx_italic(). The module has other functions that may be useful. The function selector parameter|fn= tells module:lang which function to execute. The available functions are:
is_ietf_tag – returnstrue if the providedIETF language tag is valid; nil else
{{lang|fn=is_ietf_tag|nv}} →true←
{{lang|fn=is_ietf_tag|xx}} →←
is_lang_name – returnstrue if the provided language name is valid; nil else
{{lang|fn=is_lang_name|navajo}} →←
{{lang|fn=is_lang_name|xxxxx}} →←
lang – the function that renders{{lang}}; listed here for completeness, this particular usage is more-or-less pointless
lang_xx_inherit – the function that renders{{lang-??}} template where the text is not italicized; can be used when a{{lang-??}} template, for example{{lang-aao}}, does not exist for a particular language:
{{lang|fn=lang_xx_inherit|code=aao|Algerian Saharan Arabic text}} →Algerian Saharan Arabic:Algerian Saharan Arabic text
lang_xx_italic – the function that renders{{lang-??}} template where the text is italicized; can be used when a{{lang-??}} template, for example{{lang-svc}}, does not exist for a particular language:
{{lang|fn=lang_xx_italic|code=svc|Vincentian Creole English text}} →Vincentian Creole English:Vincentian Creole English text
name_from_tag – returns the language name associated with the provided IETF language tag:
{{lang|fn=name_from_tag|apa}} → Apache languages
tag_from_name – returns the ISO 639 language code (sometimes IETF language tag) associated with the provided language name:
{{lang|fn=tag_from_name|havasupai}} → yuf-x-hav
transl – the function that renders{{transl}}; listed here for completeness, this particular usage is more-or-less pointless
{{lang|fn=transl|ar|DIN|al-Ḫawārizmī}} →Ошибка скрипта: Функции «transl» не существует.