This template is within the scope of WikiProject Languages, a collaborative effort to improve the coverage of languages on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.LanguagesWikipedia:WikiProject LanguagesTemplate:WikiProject Languageslanguage
Template:Lang is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases.
This template was considered for deletion on 2006 February 20. The result of the discussion was "keep".
To help centralize discussions and keep related topics together, the talk pages for all help pages, categories, MediaWiki messages and templates related to Template:Lang redirect here.
What is the purpose of bs, hr and sr templates, when every now and then some (Yugo-nostalgic) editor comes and changes it to sh? Please change all these from bs, hr, sr => sh, and that's it. GoodBosnian (talk) 16:55, 1 May 2025 (UTC)[reply]
@Jonesey95 @Trappist the monk Thank you for replies. Correct, it's true that bs, hr and sr are valid languages, per ISO 639, but many editors here disrespect it, and when I say bs, hr, or sr template I mean {{lang|bs}}, {{lang|hr}}, and {{lang|sr}}. For example, in this edit: [1] user changed bs to sh, and in many articles regarding Bosnia or Bosnian people they do the same. Even Wikipedia considers these 3 languages just "varieties" of SerboCroatian language (and I don't care if it is correct way or that's "just" the name they call it), if we consider it one language here, and editors are allowed to change such things, then let's remove "varieties" altogether, and switch to "sh" everywhere. Otherwise, we are making grounds for edit-warring, blocks, etc. Or create a rule how to use these "varieties" here to know who is right, and who is wrong during edits. GoodBosnian (talk) 10:04, 2 May 2025 (UTC)[reply]
This is the wrong venue. If an editor is making changes that you disagree with, that editor's talk page is the place to begin a discussion. – Jonesey95 (talk) 13:14, 2 May 2025 (UTC)[reply]
I don't think that this talk page is the place to establish language-tagging best-practice for bs, hr, sr, and sh. Seems to me that the most likely place to discuss that would be at a cognizant wikiproject or perhaps one of the MOS pages. I do not think that the templates supported by Module:Lang should redirect bs, hr, and sr to sh.
I've commented at the previous discussion and have no more insights to add. If no one adds anything else, do whatever you feel is correct, as that is still better than leaving these templates. Gonnym (talk) 10:58, 12 May 2025 (UTC)[reply]
I would like to propose that in instances where you may need to translate a large amount of text strings from one language to another, maybe we should use a template that makes it a little bit easier to do so such as Template:Translation table. That template (albeit a WIP) calls the Langx template.
At Wikipedia:Templates for discussion/Log/2025 April 17#Template:Lang-rus it was proposed to replace {{Lang-rus}} with {{lang}} and {{langx}} templates. The discussion ended with the result of merging the features of {{Lang-rus}}, which mostly means enabling {{lang}} to have access to the additional features {{langx}} has leaving the only difference between the two templates the language name appearance vs tooltip. The only parameter left that both don't use is an IPA parameter, but since both don't use it, this could probably either be handled as we do now, or added as a new feature. Gonnym (talk) 08:30, 15 May 2025 (UTC)[reply]
Option to use language codes instead of full language name
For situations where space is tight, it would be nice to have the option to indicate the use of language codes (probably ISO 639-3) instead of the written-out language name. DeklinCaban (talk) 13:42, 3 June 2025 (UTC)[reply]
Your post is somewhat vague. I presume that you are talking about {{langx}} which normally outputs a language-name label:
The ISO 639-6 standard has been withdrawn and is not included in the IANA language-subtag-registry file. Browsers and screen readers use the data defined in the language-subtag-registry file to properly render and/or pronounce non-English text. For them to do that, {{lang}}, {{langx}}, and other templates must use the same data to markup non-English text at en.wiki.
Since Standard Chinese appears to be a descendant of Mandarin Chinese, you might use cmn → {{lang|fn=name_from_tag|cmn}} → Mandarin Chinese.
That should never be used. If an article exists in the English language there is never a reason to link to another language. If you need to link to a Wiktionary translation of the word, then use {{wikt-lang}}. Gonnym (talk) 11:07, 13 July 2025 (UTC)[reply]
Removing the prescription not to put links inside the template
I don't really understand the rationale for this prescription in the documentation:
Do not write:
{{lang|grc|[[wikt:Κλεοπάτρα#Ancient Greek|Κλεοπάτρα]]|nocat=yes}}
The words 'wikt' and 'Ancient Greek' are not Ancient Greek words so do not belong in the same markup as the Ancient Greek word Κλεοπάτρα.
This doesn't really make any sense: the point of these language tags is to ensure that the text is properly-formatted in the output HTML (i.e. the page that a user's browser will load). Due to the way links are processed on MediaWiki, the text in the link target (i.e. wikt:Κλεοπάτρα#Ancient Greek) will never be treated as tagged text in the final output, because it's strictly part of the link, so it doesn't matter what kind of text is in there. Here is the actual HTML output:
If you compare this to the prescribed form [[wikt:Κλεοπάτρα#Ancient Greek|{{lang|grc|Κλεοπάτρα|nocat=yes}}]], it's easy to see how it makes no functional difference which way round it is:
Description of suggested change: Requesting edit to Module:Lang/data/iana languages - switching use of outdated name for an indigenous language to the autonym now found more commonly in recent literature (Camsá -> Kamëntšá), consistent with the article titles on Wikipedia (Kamëntšá people, Kamëntšá language)
IANA gets its language names from ISO 639. The ISO 639 custodian lists the language name for arx as Aruá (Rodonia State). Apparently there was a a change from Aruá to Aruá (Rodonia State) in 2008 but I can't find the change request that caused that. Regardless, if you want to change the source from Aruá (Rodonia State) to Aruá (Rondônia State) or some other name you must take that up with the ISO 639 custodian.
I have overridden the IANA-supplied name to use the 'Rondonia State' disambiguator: