Template talk:Lang
This is the talk page for discussing improvements to the Lang template. |
|
Archives: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16Auto-archiving period: 4 months ![]() |
![]() | This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||
|
![]() | 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 cite errors redirect here. |
How do I include a non-literal translation?
[edit]The langx template has a translation parameter, but it produces "lit. [text]". What should I do if I want to include a non-literal translation? TryKid [dubious – discuss] 18:21, 2 January 2025 (UTC)
- You don't have to use the translation parameter:
{{langx|es|casa}}, 'dwelling'
→ Spanish: casa, 'dwelling'
- Include punctuation and any descriptive text as you see fit. Of course, if you do sommat like that, some helpful editor is likely to come along and 'fix' your carefully crafted non-literal translation...
- —Trappist the monk (talk) 20:07, 2 January 2025 (UTC)
- I see. It's strange that the parameter automatically defaults to "literal translation". I think most of the useful translations included on Wikipedia aren't literal, but are cited to sources which make thoughtful decisions on how to translate something (e.g. Haravijaya, the reason I asked this question). Having a "lit." parameter seems like a magnet inviting original research from editors to translate something themselves.
- Any chance of changing this to something more sensible, maybe two separate lit and translation parameters? regards, TryKid [dubious – discuss] 21:23, 2 January 2025 (UTC)
- That is exactly what we do on Wiktionary, so I agree that it's a good idea. The difference is especially relevant if you're dealing with idioms: e.g. Greek ξεβράκωτος στ' αγγούρια (xevrákotos st’ angoúria, "caught with one's pants down; unprepared", lit. "pantsless among the cucumbers"). Theknightwho (talk) 02:22, 4 January 2025 (UTC)
- Even better: Use {{gloss}} (without comma per MOS:SIMPLEGLOSS), i.e.:
{{langx|es|casa}} {{gloss|dwelling}}
→ Spanish: casa 'dwelling'.
- This is the norm in linguistics. --Florian Blaschke (talk) 23:04, 9 April 2025 (UTC)
- Even better: Use {{gloss}} (without comma per MOS:SIMPLEGLOSS), i.e.:
RfC on related template
[edit]Please this post for an RfC on two new related templates that were recently developed: {{Korean/auto}} and {{Infobox Korean name/auto}}. These templates have semi-automatic romanization of Korean, among other new features.
The goal of the project is to gradually phase out their predecessor templates ({{Korean}} and {{Infobox Korean name}}) and replace them with the new versions. Please voice any opinions at that RfC. seefooddiet (talk) 20:21, 21 April 2025 (UTC)
Delete bs, hr, and sr
[edit]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)
- bs is a valid ISO 639 language code for Bosnian language. hr is a valid code for Croatian language. sr is a valid code for Serbian language. If editors are changing those codes in articles in a disruptive way, see Wikipedia:Disruptive editing for guidance. – Jonesey95 (talk) 18:00, 1 May 2025 (UTC)
- (edit conflict)
- I think that you need to be more specific about what you mean. None of these templates exist:
- The ISO 639-1 language tags
bs
,hr
,sr
, andsh
are all valid language tags so use of these tags with{{lang}}
and{{langx}}
is a legitimate usage. - —Trappist the monk (talk) 18:03, 1 May 2025 (UTC)
- @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)
- 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)
- (edit conflict) (again)
- I don't think that this talk page is the place to establish language-tagging best-practice for
bs
,hr
,sr
, andsh
. 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 redirectbs
,hr
, andsr
tosh
. - —Trappist the monk (talk) 13:21, 2 May 2025 (UTC)
- @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)
New private language codes needed
[edit]Please add private language codes for the following templates per their TfD:
Gonnym (talk) 17:04, 7 May 2025 (UTC)
- Too bad none of those TfDs nor the holding cell say what these new private-use tags should be. At Template talk:Lang/Archive 14 § Next steps? I suggested:
{{Lang-1ca}}
→trk-x-oldanat
{{Lang-est-sea}}
→et-x-seto
{{Lang-fra-frc}}
→fr-x-frainc
- There wasn't much in the way of approval/disapproval. But, to all who follow this talk page, opinions?
- —Trappist the monk (talk) 17:33, 7 May 2025 (UTC)
- 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)
- Ok done:
trk-x-oldanat
→ Old Anatolian Turkishet-x-seto
→ Setofr-x-frainc
→ Franc-Comtois
- —Trappist the monk (talk) 11:56, 12 May 2025 (UTC)
- Ok done:
- 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)
Usage en masse
[edit]Hi everyone,
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.
Here's an example of what I'm proposing:
Japanese | Transliteration | English |
---|---|---|
君が代は | Kimigayo wa | May your reign |
千代に八千代に | Chiyo ni yachiyo ni | Continue for a thousand, eight thousand years |
さざれ石の | Sazare ishi no | Until the tiny pebbles |
巌となりて | Iwao to narite | Grow into massive boulders |
苔の生すまで | Koke no musu made | Lush with moss |
.
Thoughts? Gommeh ➡️ Talk to me 19:56, 11 May 2025 (UTC)
- There isn't a lot of situations where a table like that is actually needed. The example you gave would be much better served with {{Verse transliteration-translation}}. Gonnym (talk) 11:00, 12 May 2025 (UTC)
- Another place where we may want to use it is where we want to explain how languages work with examples, e.g.
Spanish | English |
---|---|
yo tengo | I have |
tú tienes | you have |
él/ella tiene | he/she has |
usted tiene | you (formal) have |
nosotros tenemos | we have |
ellos/ellas/ustedes tienen | they/you (plural) have |
. Gommeh ➡️ Talk to me 12:10, 12 May 2025 (UTC)
Editor Gommeh: {{Translation table}}
is broken badly here and in Law Concerning the Head of State of the German Reich and Nuremberg Laws. I know that it used to work here; can't say whether it ever worked at those two articles. The obvious first step is to make the module name match the template name...
—Trappist the monk (talk) 19:20, 15 May 2025 (UTC)
- Didnt realize there was a typo in there when I updated it, fixed. Thanks for bringing that up. Gommeh ➡️ Talk to me 19:48, 15 May 2025 (UTC)
- and I can confirm it does work on those two articles. Gommeh ➡️ Talk to me 19:51, 15 May 2025 (UTC)
Lang-rus merge
[edit]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)
- Agreed. Gommeh ➡️ Talk to me 19:52, 15 May 2025 (UTC)
Option to use language codes instead of full language name
[edit]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)
- Your post is somewhat vague. I presume that you are talking about
{{langx}}
which normally outputs a language-name label:{{langx|es|casa}}
→ Spanish: casa
- If that is what you are talking about, the facility already exists:
{{langx|es|casa|label=[[Spanish language|es]]}}
→ es: casa
- —Trappist the monk (talk) 13:47, 3 June 2025 (UTC)
When looking at the language codes for Standard Chinese, no ISO 639-3 code is provided, and none of the ISO 639-6 codes work. What codes should be used? Do the ISO 639-6 codes need to be added? Element10101 AIW WPI TOLT ~ C 19:21, 16 June 2025 (UTC)
- 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. - —Trappist the monk (talk) 22:55, 16 June 2025 (UTC)
- Thanks, I used this to fix an error at Cross-linguistic onomatopoeiae#Human sounds. Element10101 AIW WPI TOLT ~ C 00:56, 17 June 2025 (UTC)
Mention how to get both words linked
[edit]I did it! I figured out how to turn low performing
- Russian: тундра
into superpowered
with both words linked!
I used
- {{Langx|ru|[[ru:тундра|]]}}
And maybe you will need two colons sometimes: {{langx|zh|[[:zh:冬荫功|]]}}, giving Chinese: 冬荫功.
Jidanni (talk) 00:22, 13 July 2025 (UTC)
- 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)
Update to 2025-06-23
[edit]https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry was last updated on 2025-06-23 but the module does not still understand de-viennese (test: German: Weanarisch, Weanerisch ) Can you update it? -- Error (talk) 11:06, 15 July 2025 (UTC)
Removing the prescription not to put links inside the template
[edit]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:
<span title="Ancient Greek (to 1453)-language text">
<span lang="grc">
<a href="https://en.wiktionary.org/wiki/%CE%9A%CE%BB%CE%B5%CE%BF%CF%80%CE%AC%CF%84%CF%81%CE%B1#Ancient_Greek" class="extiw" title="wikt:Κλεοπάτρα">
Κλεοπάτρα
</a>
</span>
</span>
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:
<a href="https://en.wiktionary.org/wiki/%CE%9A%CE%BB%CE%B5%CE%BF%CF%80%CE%AC%CF%84%CF%81%CE%B1#Ancient_Greek" class="extiw" title="wikt:Κλεοπάτρα">
<span title="Ancient Greek (to 1453)-language text">
<span lang="grc">
Κλεοπάτρα
</span>
</span>
</a>
Could we please remove the prescription? Theknightwho (talk) 21:16, 15 July 2025 (UTC)