Template talk:Lang

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Module talk:Lang)

WikiProject iconLanguages Template‑class
WikiProject iconThis 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.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.

Foreign-language article titles[edit]

31 August 2021 (UTC)

Forced prefixing of *[edit]

I've just noticed that use of codes for protolanguages, as in {{lang|cel-x-proto|...}}, forces a prepended * (indicating a construction unattested in surviving materials). This is undesirable, since in the vast majority of cases what we're going to be doing is replacing existing in-article strings with bare italics and no lang markup, like *''kal-'', with templated replacements, e.g. *{{lang|cel-x-proto|kal-}}, but this produces a double ** which has to be manually fixed. And there are apt to be tabular-data cases (interlinear glosses, etc.) in which an entire row of cells is prefixed with * and specific words or morphemes in particular cells follow this and should not each individually have * but should still have language markup. At bare minimum we need a way to suppress this "auto-*" behavior, but ideally it would be off by default and turned on only by a parameter switch, since it is unexpected, inconsistent, completely undocumented, and almost always editorially unhelpful. PS: If this does get changed, please ping me, since I will need to go fix Caledonians#Etymology and some other things to have non-templated * again.  — SMcCandlish ¢ 😼  07:35, 2 March 2024 (UTC)[reply]

Two thoughts: there is some value to the asterisk symbol as unattested (especially if we tooltip the first occurrence à la {{c.}}), so could we use {{asterisk}}, or perhaps (new) {{unattested}} and have that resolve to {{asterisk}}? Alternatively, what about just using one of the many star-shaped thingies that look like asterisk, but aren't, e.g.,
(U+274B HEAVY EIGHT TEARDROP-SPOKED PROPELLER ASTERISK) (my favorite, but several more hidden in the wikicode).
Thanks, Mathglot (talk) 11:17, 2 March 2024 (UTC)[reply]
Already exists but, alas, not documented:
{{lang|cel-x-proto|kal-}}*kal-
{{lang|cel-x-proto|kal-|proto=no}}kal-
{{lang-cel-x-proto|kal-}}Proto-Celtic: *kal-
{{lang-cel-x-proto|kal-|proto=no}}Proto-Celtic: kal-
Trappist the monk (talk) 15:02, 2 March 2024 (UTC)[reply]

Testing bullet-asterisk interaction with proto asterisk:

  • one asterisk, to make a bullet item
  • *kal- one asterisk, followed immediately by {{lang|cel-x-proto|kal-}}
  • one asterisk to make another bullet item

Looks good. We should document Module code starting at line 791 of the Module in a new, level-4 subsection 'Proto' at Template:Lang, probably to live under section § Formatting. Mathglot (talk) 20:05, 2 March 2024 (UTC)[reply]

But wait—you said in sentence 2, but this produces a double ** which has to be manually fixed, so what was your example that produced a double asterisk? It seems to be the identical code that works just above. Can you reproduce your error case below? Mathglot (talk) 20:14, 2 March 2024 (UTC)[reply]

@Trappist the monk: I need a private-use language tag for Anatolian languages. Antiquistik (talk) 20:32, 6 April 2024 (UTC)[reply]

Propose one. You know the rules for making a private-use tag.
Trappist the monk (talk) 21:45, 6 April 2024 (UTC)[reply]
@Trappist the monk: Does anat work? Or is it already assigned? Antiquistik (talk) 21:51, 6 April 2024 (UTC)[reply]
and the rest of it?
Trappist the monk (talk) 22:01, 6 April 2024 (UTC)[reply]
@Trappist the monk: I have no idea. I will need your help for that. Antiquistik (talk) 00:00, 7 April 2024 (UTC)[reply]
I'm just the coder. Perhaps you can consult with WP:Languages or WP:Linguistics or some other such wikiproject.
Trappist the monk (talk) 00:07, 7 April 2024 (UTC)[reply]
@Trappist the monk: Would ine-x-anatolia work? Antiquistik (talk) 17:59, 15 April 2024 (UTC)[reply]
{{lang|ine-x-anatolia|text}}text
Trappist the monk (talk) 18:20, 15 April 2024 (UTC)[reply]
@Trappist the monk: Thanks! Antiquistik (talk) 19:00, 15 April 2024 (UTC)[reply]

Changes[edit]

Has something changed with this? I don't know the ins and outs of the module/template but the way it displays at 2022 Comhairle nan Eilean Siar election has changed and I'm not sure what I'd need to alter so it displays correctly. Stevie fae Scotland (talk) 13:35, 11 April 2024 (UTC)[reply]

Nothing has changed in the module. Here is the history of that template in 2022 Comhairle nan Eilean Siar election:
  • at this edit, you added the template {{lang-for||Scottish Gaelic|Council of the Western Isles}}
  • at this edit, using AWB, I changed it to {{lang-for|gd||Council of the Western Isles}}
  • at this edit, I changed it to {{lang-for|gd|'''[[Comhairle nan Eilean Siar]]'''|Council of the Western Isles}}
  • at this edit, Editor Pedia9jb6l changed it to {{lang-for|gd|[[Comhairle nan Eilean Siar]]|Council of the Western Isles}}
On 10 April 2024, this edit by Editor PK2 changed {{lang-for}} from a redirect to {{Language with name/for}} to a {{lang-??}} template. That change broke the template on 2022 Comhairle nan Eilean Siar election. The editor did not explain why that change was made. Special:WhatLinksHere/Template:Lang-for indicates that there may be more articles that were broken by this edit.
I have reverted the edit at {{lang-for}}.
Trappist the monk (talk) 15:14, 11 April 2024 (UTC)[reply]
Thanks very much for looking into this and for fixing it. Stevie fae Scotland (talk) 09:00, 12 April 2024 (UTC)[reply]

Create {{lang-isv}} and other relevant templates for Interslavic[edit]

Interslavic has recently received an ISO 639-3 code: isv. Latin and Cyrillic are equal in status in Interslavic, just like in Serbo-Croatian. –Vipz (talk) 09:34, 27 April 2024 (UTC)[reply]

isv not listed in the current (2024-03-07) version of the IANA language-subtag-registry file so nothing to be done yet.
Trappist the monk (talk) 11:42, 27 April 2024 (UTC)[reply]
It is now. "Added: 2024-05-15" -- --Error (talk) 11:43, 22 May 2024 (UTC)[reply]

Quoting multiple alternative translations[edit]

How does one correctly quote multiple translations using this template? I am trying to fix an issue on German Air Force, which includes in its lede the problematic lang-de template

German: Luftwaffe, lit.'air weapon or air arm'

from the source code

{{lang-de|'''Luftwaffe'''|lit=air weapon or air arm}}

which is not quoted correctly. I can fix this by doing

{{lang-de|'''Luftwaffe'''|lit=air weapon' or 'air arm}}

leading to

German: Luftwaffe, lit.'air weapon' or 'air arm'

but this is a rather inelegant hack. Is there a better way to quote multiple lit values?

I have searched the talk archives here but couldn't find anything if this had been asked before. Thanks, Ainlina(box)? 15:30, 29 April 2024 (UTC)[reply]

In context, it would seem to me that |lit=air force is a better choice for the lead. If you wish to delve into the etymology of the word, perhaps a footnote linking the Wiktionary German entry for Luftwaffe is appropriate.
Recently, there has been discussion at Wikipedia talk:WikiProject Military history § Luftwaffe, lang template/italics or not? that you might find interesting.
Trappist the monk (talk) 15:51, 29 April 2024 (UTC)[reply]
Thanks for the info, unfortunately I have very little subject matter knowledge, and was just browsing and encountered some bad formatting. Is there a correct way to do this if two translations are both needed due to ambiguity? Thanks, Ainlina(box)? 17:05, 29 April 2024 (UTC)[reply]

Question about Category:Articles containing Dogrib-language text[edit]

For some reason, Category:Articles containing Dogrib-language text has started showing an error message (Error: Dogrib is not a valid ISO 639 or IETF language name. Please see Template talk:Lang for assistance.), is empty, and has been tagged for speedy deletion. We still have an article at Dogrib language, and the ISO 639 code is still dgr. It appears that articles that should be placed into that category are now being placed into the new (as of 22 May 2024) Category:Articles containing Tlicho-language text. I don't know what happened behind the scenes (maybe this change?), but we have an inconsistency between our article name and our category naming, which is undesirable. – Jonesey95 (talk) 23:41, 27 May 2024 (UTC)[reply]

The 2024-04-15 update to the ISO 639-3 dgr name list is the result of this change request. That update is reflected in this update to Module:Language/data/ISO 639-3. Subsequently, IANA incorporated that change (in reverse name-order in the 2024-05-16 update to their language-subtag-registry file which is reflected in this update to Module:Language/data/iana languages.
When multiple names are provided by IANA, Module:Lang takes the first name in the list – in this case 'Tlicho'. This may be overridden in Module:Lang/data when there is consensus to do so.
Trappist the monk (talk) 18:01, 28 May 2024 (UTC)[reply]

Limitations possibly requiring template modification[edit]

Given that I edit ancient history articles, I have to use this template extensively for a large range of languages, and I'm finding some lacks in it that limit my ability to edit:

  • the {{lang- form of the template should also display a label for the name of the language used similar to when using the {{lang| form;
  • the {{lang| form needs a |translit= option that works just like it does with the {{lang-... form;
  • the |translit= needs an option where there is a comma instead of the romanized: label usually preceding the transcription in addition to the already existing format with the romanized: label;
  • there needs to be an option for adding multiple spellings and multiple transliterations; for example:
    • the name Tuwaddis was recorded as 𔕬𔗬𔑣𔓯𔗔 and 𔕬𔓬𔑣𔕣, and presenting them in an article currently requires me to write
the code {{lang-hlu|𔕬𔗬𔑣𔓯𔗔}} <small>and</small> {{lang|hlu|𔕬𔓬𔑣𔕣}}, <small>romanized</small> {{transl|akk-x-neobabyl|Tuwaddis}}
to obtain Hieroglyphic Luwian: 𔕬𔗬𔑣𔓯𔗔 and 𔕬𔓬𔑣𔕣, romanized Tuwaddis;
  • similarly, if I want to make a list of the various forms of the Hieroglyphic Luwian name Ḫartapus in an article, I would need to write it
as {{lang-hlu|𔓟‎𔖱𔐞𔕯𔗔‎}}, {{lang|hlu|𔓟‎𔖱𔐞𔗣𔗔‎}} and {{lang|hlu|𔗖‎𔐞𔕯𔗔}}, <small>romanized:</small> {{transl|hlu|Ḫartapus}}
to obtain Hieroglyphic Luwian: 𔓟‎𔖱𔐞𔕯𔗔‎, 𔓟‎𔖱𔐞𔗣𔗔‎ and 𔗖‎𔐞𔕯𔗔, romanized: Ḫartapus;
  • meanwhile, the name 𒁹𒌇𒁮𒈨𒄿 is interpreted as either Tugdammî and Dugdammî, and presenting them in an article currently requires me to write
the code {{lang-akk-x-neoassyr|𒁹𒌇𒁮𒈨𒄿|translit=Tugdammî}} <small>or</small> {{transl|akk-x-neoassyr|Dugdammî}}
to obtain Neo-Assyrian Akkadian: 𒁹𒌇𒁮𒈨𒄿, romanized: Tugdammî or Dugdammî;
  • and the name 𒁹𒄖𒊌𒄖 is interpreted as both Gugu and Guggu, but presenting it in an article would require that I write
the code {{lang-akk-x-neoassyr|𒁹𒄖𒊌𒄖|translit=Gugu}} <small>and</small> {{transl|akk-x-neoassyr|Guggu}}
to obtain Neo-Assyrian Akkadian: 𒁹𒄖𒊌𒄖, romanized: Gugu and Guggu
  • if I need to make a list of the various spellings of the name māt Tabali, for example, I need to write
the code {{transl|akk-x-neoassyr|māt Tabali}} ({{lang|akk-x-neoassyr|𒆳𒋫𒁀𒇷}}, {{lang|akk-x-neoassyr|𒆳𒋫𒁀𒀀𒇷}}, {{lang|akk-x-neoassyr|𒆳𒋫𒁄𒇷}}, {{lang|akk-x-neoassyr|𒆳𒋰𒀀𒇷}})
to obtain māt Tabali (𒆳𒋫𒁀𒇷, 𒆳𒋫𒁀𒀀𒇷, 𒆳𒋫𒁄𒇷, 𒆳𒋰𒀀𒇷);
  • and if I want to make a list of the various forms of the name Qedar, I need to write
the code Neo-Assyrian Akkadian: 𒆳𒆤𒊑, Qidri; 𒆳𒆤𒊏𒀀𒀀, Qidrāya; 𒆳𒆥𒁕𒀀𒊑, Qidāri; 𒆳𒋡𒁕𒊑, Qadari; 𒆳𒋡𒀜𒊑, Qadri; 𒇽𒆤𒊏𒀀𒀀, Qidrāya; 𒇽𒆥𒁯𒊏𒀀𒀀, Qidarāya; 𒌷𒆥𒁕𒊑, Qidari; and 𒇽𒄣𒁕𒊑, Qudari
  • I would also require a transcription parameter because some scripts are not transcribed in the exact same was as their reconstructed pronunciation, and this sometimes needs to be shown in the text.
  • For example, Mycenaean Greek kʰalkós was written as 𐀏𐀒 in Linear B script, which is transcribed as ka-ko, but the template as it now exists only allows me to add the Linear B text and the word as it was pronounced, but not the transcription of the text;
  • Integrating the functions of {{script}} into the {{lang}} template would also be useful because sometimes the coding takes too much space in the article or using it makes the article unnecessarily big so that it would be preferable to shift this onto the templates instead.
  • For example, {{lang-ae|}} and {{lang|ae|}} should have a parameter that functions in the same way as if {{lang-ae|{{script|Avst|}}}} and {{lang|ae|{{script|Avst|}}}} were used.
  • Some scripts, like cuneiform, however use multiple variants due to how widespread and long-lived their use was, and, if creating such a parameter is possible, it would need to be able to render the various fonts used in Template:Script/Cuneiform.
  • This parameter should be optional, however, because some of the script templates, like {{script|Grek|}} and {{script|Latn|}} render the text in a font that is difficult to read and are therefore already discouraged.
  • There also needs an option where interting - in the text parameter followed by the transliteration in the template displays the language followed by the transliteration.
  • For example, {{lang-sa|-|bharu}} should give something that displays like Sanskrit: bharu.

Would it be feasible to modify the template so as to remove any or some or even all of these current limitations? Antiquistik (talk) 15:01, 28 May 2024 (UTC)[reply]