Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Jump to content

Template talk:Lang/Archive 12

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 5Archive 10Archive 11Archive 12Archive 13

rsk for Pannonian Rusyn

Adding template:lang-rsk to a page includes it in Category:Articles containing Ruthenian-language text that links to Ruthenian language while the article for the rsk language is Pannonian Rusyn. I don't know that is the better name for the language, but the language described in Ruthenian language is not the one that was assigned rsk. --Error (talk) 02:12, 5 March 2022 (UTC)

The template is doing the correct thing. ISO 639-3 gives the name for rsk as 'Ruthenian' (see https://iso639-3.sil.org/code/rsk). The IANA language-subtag-registry file has 'Ruthenian' and 'Rusyn' for rsk (Module:Lang always takes the first-listed name when there are multiple names).
We can override that locally if there is consensus to do so. It is not clear to me that Pannonian Rusyn is the same as the 'Ruthenian' described in the documents linked from ISO 639-3 Change Request 2021-005 – the word 'Pannonian', for example, is only mentioned once in each of those documents, and then, only as part of a poem's title. Overriding, however, should be done with care because there is an article Ruthenian language so perhaps that article should be moved elsewhere for the avoidance of confusion with Ruthenian-as-Pannonian-Rusyn (ISO 639 v. en.wiki or perhaps it's ISO 639 v. the rest of the linguistic world).
Trappist the monk (talk) 15:41, 5 March 2022 (UTC)
After browsing the ISO application, I see that the proponents don't acknowledge the use of "Ruthenian" for other languages and use "Rusyn" for a different language. I understand that rsk is the code for what Wikipedia currently calls "Pannonian Rusyn". The application repeatedly names Voivodina and Novi Sad. What are the better page titles for Pannonian Rusyn and Ruthenian language I don't know.
--Error (talk) 19:59, 6 March 2022 (UTC)
I don't know either and would suggest that this template talk page is not the place to figure that out. I would guess that Talk:Ruthenian language or Talk:Pannonian Rusyn, or perhaps better, one of the several cognizant wikiprojects, is where consensus should form.
Trappist the monk (talk) 20:25, 6 March 2022 (UTC)
@Trappist the monk, Error, and YoungstownToast: I'll give you some context on this issue...
What we are dealing with here is a poorly translated and insufficiently reviewed submission for an ISO code.
The cause of this problem is that several terms that have been used to refer to similar or overlapping concepts throughout history. First, "Ruthenian language" in English typically refers to the family of languages discussed in Ruthenian language. In older scholarship (early-mid 20th century), this is also the term used to refer to the languages known today as the Rusyn language.
This becomes confusing because Pannonian Rusyns refer to their language as "руски язик" and translate that and their ethnonym into English as "Ruthenian" (and unfortunately in their submission to ISO).
Things get even more confusing, because ISO already assigned rue to Rusyn language, but rue is apparently an abbreviation for...Ruthenian.
Additionally, rsk is an abbreviation for the term Rusnak a synonym for the noun Rusyn (not adjective).
Things get even more complicated in that more recent research has indicated that Pannonian Rusyn is in fact a West Slavic language, as opposed to East Slavic like Carpathian Rusyn. So the two languages are more distantly related than previously though (this is briefly discussed in the rsk application).
My opinion is to leave things as they are, but change the description for 'rsk' to "Pannonian Rusyn" or "Vojvodina Rusyn" as these are the terms that are typically used in academic discussion. If you would like more information and sources to assist in reaching consensus, let me know. KaerbaqianRen💬 23:02, 16 May 2022 (UTC)

Inflection tables

I’ve begun adding this template to the article Old Church Slavonic grammar per cleanup template. I’m not sure, however, how I should treat the many words and endings inside inflection tables. Should I also wrap this template around suffixes like -a, , -ica, -omъ; or hyphenated words in tables like vin-ěxъ, gost-ьmь, mater-e, ljub + -lj + -ǫ (all examples from the article in original formating)? Also isn’t it all technically transliteration? MichaelTheSlav (talk) 15:02, 17 May 2022 (UTC)

Lorraine Franconian

Lorraine Franconian's IETF tag gmw-u-sd-fr57 generates an error unrecognized language tag: gmw-u-sd-fr57 when used in Template:Lang and I'm not sure how best to handle it or where to do so:

Lorraine Franconian: [Lottringe] Error: {{Lang}}: unrecognized language tag: gmw-u-sd-fr57 (help)

Does this just want adding to Module:Language/data/iana variants somehow? — OwenBlacker (he/him; Talk; please {{ping}} me in replies) 13:56, 20 May 2022 (UTC)

{{lang}} does not support unicode language and locale identifiers like gmw-u-sd-fr57 (not an IANA variant so must not be added to Module:Language/data/iana variants).
Trappist the monk (talk) 14:45, 20 May 2022 (UTC)

The treatment of yers (ь, ъ)

The two yer signs (ь, ъ) are part of the Cyrillic alphabet, but they are commonly used in transcriptions of Church Slavonic even when the rest of the transcription is wholly in the Latin alphabet. For example:

  • pьsъ – dog
  • xodimъ – we walk
  • člověkomь – with human

The problem is when using this template it seems to assume it’s entirely Cyrillic from these two signs and doesn’t italicize when using the Church Slavonic code – chu:

  • pьsъ – dog
  • xodimъ – we walk
  • člověkomь – with human

When transcribing word which don’t contain a yer italics are used though:

  • žena – woman
  • asf.

I propose to make it so that if the language code is „chu” it will ignore the presence of the two letters ь, ъ when determining whether to italicize or not. However, I don’t know the inner workings of the template, so if this is very hard to do I understand. Regards, MichaelTheSlav (talk) 19:22, 5 June 2022 (UTC)

If by transcriptions of Church Slavonic you actually mean 'transliteration' or 'romanization', use {{transl}} (and the ISO 639-1 tag cu because {{transl}} does not attempt to find the 639-1 synonym of a 639-2/3 tag):
  • {{transl|cu|pьsъ}}pьsъ – dog
  • {{transl|cu|xodimъ}}xodimъ – we walk
  • {{transl|cu|člověkomь}}člověkomь – with human
  • {{transl|cu|žena}}žena – woman
Trappist the monk (talk) 19:49, 5 June 2022 (UTC)
OK, thank you for clarification. I’ve already changed much of the page Old Church Slavonic grammar to this template but I will correct it all. MichaelTheSlav (talk) 20:07, 5 June 2022 (UTC)

Why is transliterated text put into single quotes?

The following discussion is closed. Please do not modify it. Subsequent comments should be made in a new section. A summary of the conclusions reached follows.
Closing this as WP:TALKFORK, one of at least three started by same user on same topic. MoS is the correct venue. Templates do not set style matters.  — SMcCandlish ¢ 😼  14:17, 25 August 2022 (UTC)

I've noticed that transliterated texts are inconsistently put into both single quotes and double quotes across Wikimedia articles.

In most places I've personally come across, it seems double-quotes are used. In this Module, single quotes are used. What is the thinking or consensus behind this, if any?

An example to illustrate.

1. This plugin:

Ancient Greek: ἄτομος, lit. 'indivisible, an atom'

2. Wiktionary, LSJ, certain Wikipedia articles here and there:

Ancient Greek: ἄτομος, lit. “indivisible, an atom”

As a reader, I find it confusing having inconsistent styles.

'wɪnd (talk) 11:08, 18 August 2022 (UTC)

I don't know what you mean by plugin; that is not a commonly used term in wikipedia.
Wiktionary and LSJ are separate entities that are not beholden to the English Wikipedia Manual of Style. At the English wikipedia, MOS:SINGLE specifies the use of single quotes for simple definitions so your simple example at 1 (plugin; whatever that is) above is a correct use of quotation characters to mark the English translation.
Your two Wikipedia-article examples have been manually constructed:
  • History of Animals:
    '''''History of Animals''''' ({{lang-grc-gre|Τῶν περὶ τὰ ζῷα ἱστοριῶν}}, ''Ton peri ta zoia historion'', "Inquiries on Animals"; {{langx|la|Historia Animalium}}, "History of Animals")
    History of Animals (Greek: Τῶν περὶ τὰ ζῷα ἱστοριῶν, Ton peri ta zoia historion, "Inquiries on Animals"; Latin: Historia Animalium, "History of Animals")
  • Energy:
    In [[physics]], '''energy''' (from [[Ancient Greek]]: [[wikt:ἐνέργεια#Ancient_Greek|ἐνέργεια]], ''enérgeia'', “activity”)
    In physics, energy (from Ancient Greek: ἐνέργεια, enérgeia, “activity”)
Because your English Wikipedia examples are manually constructed, whatever fault you perceive to exist in your examples is not the fault of the language templates. Both of your examples can be rewritten to use the facilities of the appropriate templates:
  • '''''History of Animals''''' ({{lang-grc-gre|Τῶν περὶ τὰ ζῷα ἱστοριῶν|translit=Ton peri ta zoia historion|translation=Inquiries on Animals}}; {{langx|la|Historia Animalium|translation=History of Animals}})
    History of Animals (Ancient Greek: Τῶν περὶ τὰ ζῷα ἱστοριῶν, romanizedTon peri ta zoia historion, lit.'Inquiries on Animals'; Latin: Historia Animalium, lit.'History of Animals')
  • In [[physics]], '''energy''' (from {{langx|grc|[[wikt:ἐνέργεια#Ancient_Greek|ἐνέργεια]]|translit=enérgeia|translation=activity}})
    In physics, energy (from Ancient Greek: ἐνέργεια, romanizedenérgeia, lit.'activity')
The templates use the correct quotation characters to mark the English translations.
Trappist the monk (talk) 13:13, 18 August 2022 (UTC)
@Trappist the monk I appreciate the fast and helpful response. I was not aware of the MOS:DOUBLE section, and I now am. Thank you.
It was not my intention to find fault in your Module code (what I incorrectly called plugin earlier); quite the contrary, I'm very grateful that you coded this, and that's why I'm writing here to clarify, so I understand the consensus. I'm new.
Most importantly, I now see that WP:MOS is the place where I might find clarification on why single vs double quotes were chosen. 'wɪnd (talk) 17:55, 18 August 2022 (UTC)
The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

lang-x2 lit. parameter support?

@Trappist the monk I noticed on Yugoslav Navy that I can't convert it to use the new lang-x2 variant because it uses a third parameter to add {{lit}} usage. Would it be possible to support that, too? --Joy [shallot] (talk) 20:23, 21 October 2022 (UTC)

... or should we just actually split it off into a call to {{lit}}. I don't know how common this usage is supposed to be, maybe it's not worth the effort? --Joy [shallot] (talk) 20:28, 21 October 2022 (UTC)
Reference:
  • {{langx|sh|Југословенска ратна морнарица|Jugoslavenska ratna mornarica|Yugoslav War Navy}}
    Serbo-Croatian: Југословенска ратна морнарица, romanizedJugoslavenska ratna mornarica, lit.'Yugoslav War Navy'
Cyrillic first:
  • {{lang-sh-Cyrl-Latn|Југословенска ратна морнарица|Jugoslavenska ratna mornarica|Yugoslav War Navy}}
    Serbo-Croatian: Југословенска ратна морнарица, Jugoslavenska ratna mornarica, lit.'Yugoslav War Navy'
Latin first:
  • {{lang-sh-Latn-Cyrl|Jugoslavenska ratna mornarica|Југословенска ратна морнарица|Yugoslav War Navy}}
    Serbo-Croatian: Jugoslavenska ratna mornarica, Југословенска ратна морнарица, lit.'Yugoslav War Navy'
Trappist the monk (talk) 22:58, 21 October 2022 (UTC)
Thanks! --Joy [shallot] (talk) 08:18, 22 October 2022 (UTC)

multiple language indication

What's the best way to format the same foreign phrase in multiple languages? I came across numerous examples over the years, most recently one reference to a word in Bulgarian and Macedonian (spelled identically). --Joy [shallot] (talk) 08:32, 23 October 2022 (UTC)

The purpose of {{lang}} is to provide proper html markup for non-English text. Html does not support the concept of multiple languages for a single text string. So, you can write the string once:
[[Bulgarian language|Bulgarian]] and {{langx|mk|<word>}}Bulgarian and Macedonian: <word>
or write two {{lang-??}} templates:
{{langx|bg|<word>}} and {{langx|mk|<word>}}Bulgarian: <word> and Macedonian: <word>
Trappist the monk (talk) 15:06, 23 October 2022 (UTC)
The first one is what is being done typically, yeah, but I was hoping we have something to mark that, because it seems like it would be bad for screen readers. Maybe they all actually just pronounce "Macedonian" in that example anyway, and don't omit it? --Joy [shallot] (talk) 16:49, 23 October 2022 (UTC)
Yeah, screen readers reading the first example will only use a Macedonian pronunciation because <word> is only marked up for Macedonian. Of course, if the Bulgarian and Macedonian pronunciations of <word> are the same, then an editor might note that somehow. In the best of all possible worlds, all non-English text at en.wiki is properly marked with proper html either manually (not recommended) or by use of the {{lang}} family of templates.
Trappist the monk (talk) 17:39, 23 October 2022 (UTC)

in lang without parentheses?

Can someone make the parens optional in Template:in lang, please? For the use case of the lead of rector (Ragusa) like this:

The '''''rector''''' ({{in lang|la|parens=no}}; {{langx|it|rettore}}, {{langx|sh|knez}}) was an official in the government of the [[Republic of Ragusa]].

Because the rest of the languages are already put in parentheses in any event. TIA. --Joy [shallot] (talk) 07:50, 29 October 2022 (UTC)

It should be in the module, on line 83 and 87 --Joy [shallot] (talk) 07:52, 29 October 2022 (UTC)
Wanted to go experiment but the diff between sandbox and live seems non-trivial [1] is it safe to squash? --Joy [shallot] (talk) 07:56, 29 October 2022 (UTC)
{{in lang}} is a replacement for the obsolete series of {{xx icon}} templates which were used to mark non-English sources. Use cases for {{in lang}} are inside <ref>...</ref> tags where the reference is not written using a cs1|2 template (which uses |language= to mark a non-English source) and with links in an external links section where the link refers to a non-English source. Using {{in lang|la}} in mainspace will add that article to Category:Articles with Latin-language sources (la).
If your intent is to note that rector is Latin and not English, then perhaps this is the better markup:
The '''{{lang|la|rector}}''' (Latin; {{langx|it|rettore}}, {{langx|sh|knez}}) was an official in the government of the [[Republic of Ragusa]].
The rector (Latin; Italian: rettore, Serbo-Croatian: knez) was an official in the government of the Republic of Ragusa.
Trappist the monk (talk) 13:18, 29 October 2022 (UTC)
Ah, I didn't read entire documentation to realize that the backstory is actually the whole point. Maybe we should make that doc more explicit, by saying that this should not be used arbitrarily inside article text, but only in reference to specific sources. Right now it implies that and says what's the typical usage, but some more guard rails on known usage to be avoided would be nice. --Joy [shallot] (talk) 16:37, 29 October 2022 (UTC)
I generally suck at documentation. If you can improve the documentation at Template:In lang/doc, please do.
Trappist the monk (talk) 16:43, 29 October 2022 (UTC)

 You are invited to join the discussion at Wikipedia talk:WikiProject Linguistics § Template consistency. Est. 2021 (talk · contribs) 10:24, 4 November 2022 (UTC)

Is it appropriate to use this template for scientific names of species, e.g. the llama (Lama glama), or should we stick to simple italics, e.g. the llama (Lama glama)? These names are always rendered in italics and use Latin grammar, although the words themselves may not be strictly Latin. pburka (talk) 00:22, 11 December 2022 (UTC)

Wikipedia:Manual of Style § Foreign words explicitly mentions {{lang}}. The very next section, Wikipedia:Manual of Style § Scientific names, does not. From that, I would assume that binomials do not get wrapped with {{lang}} templates. Does Wikipedia:WikiProject Tree of Life (or perhaps another wikiproject that deals with flora and fauna) have an opinion? You can also pose this question at WT:MOS.
Trappist the monk (talk) 00:46, 11 December 2022 (UTC)
Pburka, see MOS:LIFE for formatting guidance. See also this article section. Scientific names are not Latin, even though they are sometimes incorrectly called "Latin names". – Jonesey95 (talk) 20:50, 11 December 2022 (UTC)

Early Modern English

I use {{lang}} to decide what language text should be spell-checked against for the moss project. I just came across lots of archaic spellings in List of Acts of the Parliament of Scotland to 1707, and I expect there are many more in quoted material (which I ignore for now) in other articles. These are from before modern English spellings were standardized, but after the transition from Middle English. Normally I'd simply {{lang}}-tag this type of content. According to Early Modern English, there is no ISO 639-3 code for this time period, but the ISO 639-6 code is "emen". Unfortunately, this gives an "unrecognized language tag" error when used with the template. Does this code just need to be added somewhere, or ISO 639-6 codes generally added? (And if any screen reader ever attempts to render Early Modern English spellings, that'll be a grand challenge.) -- Beland (talk) 03:27, 15 December 2022 (UTC)

According to our article, ISO 639-6 has been withdrawn so {{lang}} and family do not support it. There is an IETF tag, en-emodeng, which {{lang}} understands to be Early Modern English.
Trappist the monk (talk) 03:52, 15 December 2022 (UTC)
@Trappist the monk: Perfect; thank you for the quick solution! -- Beland (talk) 15:55, 15 December 2022 (UTC)

I'm not touching this template because of the warning about possibly breaking something. I am requesting that a skilled editor replace the text "(click --beginning of link--here--end of link-- for list of most codes)" with "(See a List of ISO 639-1 codes.)"

This is friendlier to blind people when they request a list of all link text on a page.

Further, there are lots more codes in ISO 639-3, so even better would be:

"(See a list of ISO 639-1 codes. If you don't find the language, then see a list of ISO 639-3 codes.)"

Thisisnotatest (talk) 08:35, 25 December 2022 (UTC)

Updated Thisisnotatest (talk) 08:43, 25 December 2022 (UTC)

{{lang}} itself does not contain the words 'click here'. If you are talking about the template's documentation at Template:Lang § Syntax and usage, you may edit that documentation without fear of possibly breaking something; your edit(s) will only affect the documentation and not the actual template code (and of course you can always get back to a previous version).
The words 'click here' also appear in Template:Lang § TemplateData. For those words, {{Template parameter usage}} must be change. You can add your voice about this issue at Template talk:Template parameter usage § Unhelpful change.
I don't know what you mean by does not have a global outlook.
Trappist the monk (talk) 13:04, 25 December 2022 (UTC)
Thank you for the instruction. I've updated the template documentation and posted a comment at the other template.
Sorry I was unclear about "global outlook". The original text stated most codes were available in ISO 639-1 when there are actually so many more languages covered in ISO 639-3 (such as Filipino with code fil). My revised version continues to prioritize ISO 639-1 but not ignore languages that don't fall into that standard.
Thisisnotatest (talk) 20:38, 25 December 2022 (UTC)

Accessibility, human names in their original language

Hi, I think we need some official guidance on how people's names should be marked up. Let me preface this shortly

As of now, the names of people that are not originally English get butchered when they are read by screen reader software. Using language tags to mark them as the proper language they are originated from can help the screen reader to change the language that the name is read to have it be phonetically correct. For example, the Finnish designer Alvar Aalto's name gets butchered as long vowels and Finnish phonetics are not really a thing in English. Permikk (talk) 22:34, 24 January 2023 (UTC)

Are you saying that {{lang}} cannot correctly render a Finnish name? If the rendering is flawed or broken, please demonstrate the template's failings.
This template's rendering is controlled by en.wiki's manual of style; the template does not control the manual of style. Is the guidance at MOS:FOREIGN insufficiently official?
Trappist the monk (talk) 23:19, 24 January 2023 (UTC)
This is not actually about anything visual, it's about the guidance on if names that do not originate from English, should be wrapped in {{lang}} tags. The benefit of doing that is that when they are interpreted by a screen reader software, then the names would be pronounced correctly. (The way they are "supposed to")
At least with Finnish character-set, no visual changes would appear as we use the standard latin alphabet, but the data underlying would be more rich (the name would be wrapped in a span tagged with the marked language), is used by screen readers and it disambiguates for the software how names with ö/å/ä are pronounced. Permikk (talk) 23:32, 24 January 2023 (UTC)
I'm still confused. Does {{lang}} create incorrect or invalid html markup for Finnish text? If so, what is it about the markup that is wrong? If the rendered markup is correct, why are we having this discussion?
Trappist the monk (talk) 23:39, 24 January 2023 (UTC)
I was just making sure what the consensus was about wrapping people's names in lang tags that are not originally English and if there is a better/more standardized way to do this.
Sorry for bothering, I'm a newb just trying to contribute high quality contributions and do my homework on what is the correct, most current way to approach things as the documentation and all the features of the site are so immense. :) Permikk (talk) 23:52, 24 January 2023 (UTC)

Minor cleanup

There's a couple unused lang templates ({{lang-az-Cyrl}}, {{lang-ms-Arab}}, {{lang-tk-Cyrl}} and {{lang-uz-Cyrl}}) which are trying to use a "lang_xx" function, which doesn't exist, causing any uses of the templates and their documentation pages to error. Judging from the modules, this should really be either lang_xx_italic or lang_xx_inherit, but I'm not familiar enough with lang templates to know what is correct here. Could someone fix this? Thanks. Aidan9382 (talk) 12:18, 27 January 2023 (UTC)

Not pointless

The template documentation reads:

transl – the function that renders {{transl}}; listed here for completeness, this particular usage is more-or-less pointless

Well, it's not at all pointless – it has a use when we don't want the foreign-language term to be repeated after the lang tag. See e.g. 3 Suara. — kashmīrī TALK 21:54, 4 February 2023 (UTC)

This is about this template?
{{langx|ms|fn=transl|Three Voices}}
Malay: Three Voices
[[Malay language|Malay]]: <i lang="ms">Three Voices</i>
{{lang-ms}} does not support the |fn= parameter at all. Even if it did, such a use would be improper because 'Three Voices' in your example is not a transliteration (romanization) of the Malay text 3 Suara but rather is an English translation. You can get exactly the same (incorrect) result if you write:
{{langx|ms|Three Voices}}
Malay: Three Voices
[[Malay language|Malay]]: <i lang="ms">Three Voices</i>
To get what it is that I think you want, consider:
{{native name|ms|'''3 Suara'''}}; {{translation|Three Voices}}
3 Suara (Malay); transl. Three Voices
Trappist the monk (talk) 23:45, 4 February 2023 (UTC)
My bad, I mistook the param for "translation". Thanks.
I'd rather not have the title term wrapped in a template for a few reasons (SEO and Google snippets among them). — kashmīrī TALK 01:19, 5 February 2023 (UTC)
I guess I would be very surprised to learn that search engines get confused by correctly formed html markup around the title term (search engines read the html, not the wikitext) – after all, as it is written right now, the title term is wrapped in italic and bold markup:
'''''3 Suara'''''<i><b>3 Suara</b></i>3 Suara
I don't know if pronunciation of 3 Suara in Malay is different from the pronunciation in English, but if it is different, screen readers should use the Malay pronunciation, not the English pronunciation. Screen readers need the markup provided in the template's rendered html to correctly pronounce words read from the html.
Trappist the monk (talk) 01:49, 5 February 2023 (UTC)
Google Search snippets tend to leave out some or all of the text enclosed in lang: Thailand, Kashmiri language, etc. — kashmīrī TALK 10:18, 5 February 2023 (UTC)
I think that those are poor examples because in both of those articles, the title terms are not wrapped in {{lang}} templates. At Thailand, the google snippet does not show the end notes, nor the parenthetical pronunciation content, nor the references. Those omissions make some sense to me because, in a snippet, all of that stuff is clutter. Similarly, at Kashmiri language, the google snippet does not show parenthetical content nor references.
At Aos Sí, on the other hand, the title term is wrapped in {{lang}} and that text is shown in the google snippet: Aos Sí.
If you have page preview enabled, Wikipedia similarly omits parenthetical content and references from its 'snippets' (Thailand, Kashmiri language).
Where did you get the notion that {{lang}} adversely affects SEO and Google snippets? If that is written some place in en.wiki, that writing should be revisited.
Trappist the monk (talk) 15:07, 5 February 2023 (UTC)

Importing Wiktionary language modules?

I have been overhauling several ancient history entries on Wikipedia over the last year, and I have run with the problem of not being able to clarify which languages are being referred to when using the language templates in the cases when those specific languages do not have ISO-639 codes. In this situation, could this issue be solved by importing Wiktionary's language modules and properly modifying them so they can be added to the Private-use language tags? Antiquistik (talk) 09:49, 15 January 2023 (UTC)

I'm not overly enthusiastic about doing that. It appears to me that the language tags in wikt:Module:etymology languages/data are only semi standardized; the first part is often (always?) an ISO 639 language subtag while the succeeding subtags (especially the three-character subtags) are non-standard.
IETF defines some three-character extended language subtags. extlangs are defined for use with specific primary-language prefixes. For example, zh-cmn for Mandarin Chinese. At present there are no extlangs defined that aren't superseded by preferred equivalent primary-language subtags (cmn for Mandarin Chinese). For this reason, Module:Lang does not support IETF tags that include extlang subtags. Wiktionary language tags look like IETF language tags with extlang subtags but many, if not all, of those are not valid IETF language tags.
Module:Lang uses private-use subtags as a mechanism to connect a language tag to a language name that can be linked to an article or used in a tooltip:
la-x-medieval{{lang|fn=name_from_tag|la-x-medieval}} → Medieval Latin → Medieval Latin
{{lang|la-x-medieval|Medieval Latin text}}Medieval Latin text
If you need specific IETF private-use language tags we can make them as needed.
Trappist the monk (talk) 17:04, 15 January 2023 (UTC)
@Trappist the monk: In this situation, would it be feasible to expand the present series of IETF private-use language tags so as to cover all the languages without ISO-639 that are already included in Wiktionary's list of language modules? Antiquistik (talk) 18:31, 15 January 2023 (UTC)
New private-use tags are added to the list as they are needed. I see no reason to do otherwise. Which do you need?
Trappist the monk (talk) 00:26, 16 January 2023 (UTC)
@Trappist the monk: For now, I need tags for Aramaic, Hatran Aramaic, Palmyrene Aramaic, Ancient North Arabian, Dumaitic, Taymanitic, Eastern Gurage, Canaanite, Ammonite, Old South Arabian, Old Akkadian, Old Babylonian Akkadian, Old Assyrian Akkadian, Middle Babylonian Akkadian, Middle Assyrian Akkadian, Neo-Babylonian Akkadian, Neo-Assyrian Akkadian, Late Babylonian Akkadian, Old Egyptian, Middle Egyptian, Late Egyptian, and Demotic Egyptian. Antiquistik (talk) 06:27, 16 January 2023 (UTC)

Apparently, wikt:Module:etymology languages/data does not know anything about most of the languages that you named. A goodly number of those languages are 'unknown' to en.wiki. See the table. Listed languages that are known to wikt:Module:etymology languages/data include the associated wiktionary language tag. Redirects are italicized. Module:Lang always links to language articles through '<language name> language' redirects.

article with matching redirect article without redirect neither article nor redirect

For the Aramaic languages, I wonder if arc is the correct base. arc is defined by ISO 639-3 as 'Official Aramaic (700-300 BCE)'. Our Hatran Aramaic article says that the era for that language is 100 BCE – 240 CE; Palmyrene Aramaic dates from the 1st century BC to 273. The en.wiki Aramaic article seems to be a generic 'all-forms-of-Aramaic' article that covers a goodly number of Aramaic languages that aren't constrained to the era defined by arc.

egy seems an appropriate base for the Egyptian language tags. Similarly, akk seems an appropriate base for the Akkadian language tags.

Ancient North Arabian (and its redirects Dumaitic and Dumaitic language), so says the en.wiki article, is a collection of scripts so perhaps ar-narb is sufficient to markup Ancient North Arabian or Dumaitic text.

Trappist the monk (talk) 16:32, 16 January 2023 (UTC)

@Trappist the monk: This is bizzare, as the codes for the following languages are available to me on the Wiktionary module page:
Regarding the other languages, it seems that I was mistaken, and their codes are listed on Wiktionary's list of languages:
And two are listed on Wiktionary's list of language families:
Given the differences between Wiktionary's language module code and Wikipedia's Private-use language tags which you have mentioned, I agree with you that original tags that do not necessarily copy Wiktionary's codes would be better suited for Wikipedia.
Canaanite, Old South Arabian, and Old North Arabian are all three language families, so how their tags render when used in the template should reflect that, similarly to how the tag for Scythian (xsc) renders as "Scythian languages" rather than just "Scythian." For the languages lacking a page of their own, the various dialects of Akkadian should ideally link to the page for the Akkadian language, while Eastern Gurage should link to Gurage languages until Wikipedia's coverage of the Gurage languages is expanded so that a entry for Eastern Gurage can finally be created. Antiquistik (talk) 20:54, 16 January 2023 (UTC)
The lead section of Ancient North Arabian does say that the term refers to "possibly a language or family of languages (or dialects) related to Old Arabic," so it might be appropriate to create language tags for these so long as there is no evidence that the term does not refer to language as well? Antiquistik (talk) 20:58, 16 January 2023 (UTC)
I took you at your word that the language names in your list were/are the canonical language names. For the Akkadian languages, wikt:Module:etymology languages/data has these canonical names:
  • Late Babylonian – akk-lbb
  • Middle Assyrian – akk-mas
  • Middle Babylonian – akk-mbb
  • Neo-Assyrian – akk-nas
  • Neo-Babylonian – akk-nbb
  • Old Akkadian – akk-old
  • Old Assyrian – akk-oas
  • Old Babylonian – akk-obb
For these that you found at wikt:Wiktionary:List of languages:
  • Aramaic – arc – this tag is known to Module:Lang: {{lang|fn=name_from_tag|arc|link=yes}}; → Imperial Aramaic some tag other than arc should be the base tag for marking up generic Aramaic-language text
  • Ancient North Arabian – xna – this tag is known to Module:Lang: {{lang|fn=name_from_tag|xna|link=yes}}Ancient North Arabian; ISO 639-3 defines this language as an individual language, not a collective
  • Dumaitic – sem-dumsem seems a reasonable base tag for this language
  • Ammonite – sem-ammsem seems a reasonable base tag for this language
  • Demotic Egyptian – egx-dem – listed as Demotic; Demotic (Egyptian) says that this is an ancient Egyptian script so perhaps egy-Egyd is appropriate
  • Taymanitic – sem-taysem seems a reasonable base tag for this language
  • Canaanite – sem-cansem seems a reasonable base tag for this language; for this tag, set language name to Canaanite languages
  • Old South Arabian – sem-osa seems a reasonable base tag for this language; for this tag, set language name to Old South Arabian languages
These are not listed at wikt:Wiktionary:List of languages but are listed at wikt:Module:etymology languages/data
  • Old Egyptian – egy-old
  • Middle Egyptian – egy-mid
  • Late Egyptian – egy-lat
Old North Arabian was not included in your original list and is not included in wikt:Wiktionary:List of languages nor in wikt:Module:etymology languages/data. Did you mean Ancient North Arabian?
Trappist the monk (talk) 23:41, 16 January 2023 (UTC)
@Trappist the monk: I referred to the languages as they are named in Wiktionary's modules and lists, and I apologise for the confusion. Indeed, Old North Arabian is in fact Ancient North Arabian. Antiquistik (talk) 09:43, 17 January 2023 (UTC)

Ok, these:

  • Aramaic – sem-x-aramaic{{lang|fn=name_from_tag|sem-x-aramaic|link=yes}}; → Aramaic
  • Hatran Aramaic – sem-x-hatran{{lang|fn=name_from_tag|sem-x-hatran|link=yes}}; → Hatran Aramaic
  • Palmyrene Aramaic – sem-x-palmyren{{lang|fn=name_from_tag|sem-x-palmyren|link=yes}}; → Palmyrene Aramaic
  • Taymanitic – sem-x-taymanit{{lang|fn=name_from_tag|sem-x-taymanit|link=yes}}; → Taymanitic
  • Eastern Gurage – sem-x-egurage{{lang|fn=name_from_tag|sem-x-egurage|link=yes}}; → Eastern Gurage
  • Canaanite – sem-x-canaan{{lang|fn=name_from_tag|sem-x-canaan|link=yes}}; → Canaanite languages
  • Ammonite – sem-x-ammonite{{lang|fn=name_from_tag|sem-x-ammonite|link=yes}}; → Ammonite
  • Old South Arabian – sem-x-oldsoara{{lang|fn=name_from_tag|sem-x-oldsoara|link=yes}}; → Old South Arabian
  • Old Akkadian – akk-x-old{{lang|fn=name_from_tag|akk-x-old|link=yes}}; → Old Akkadian
  • Late Babylonian Akkadian – akk-x-latbabyl{{lang|fn=name_from_tag|akk-x-latbabyl|link=yes}}; → Late Babylonian Akkadian
  • Middle Babylonian Akkadian – akk-x-midbabyl{{lang|fn=name_from_tag|akk-x-midbabyl|link=yes}}; → Middle Babylonian Akkadian
  • Neo-Babylonian Akkadian – akk-x-neobabyl{{lang|fn=name_from_tag|akk-x-neobabyl|link=yes}}; → Neo-Babylonian Akkadian
  • Old Babylonian Akkadian – akk-x-oldbabyl{{lang|fn=name_from_tag|akk-x-oldbabyl|link=yes}}; → Old Babylonian Akkadian
  • Middle Assyrian Akkadian – akk-x-midassyr{{lang|fn=name_from_tag|akk-x-midassyr|link=yes}}; → Middle Assyrian Akkadian
  • Neo-Assyrian Akkadian – akk-x-neoassyr{{lang|fn=name_from_tag|akk-x-neoassyr|link=yes}}; → Neo-Assyrian Akkadian
  • Old Assyrian Akkadian – akk-x-oldassyr{{lang|fn=name_from_tag|akk-x-oldassyr|link=yes}}; → Old Assyrian Akkadian
  • Old Egyptian – egy-x-old{{lang|fn=name_from_tag|egy-x-old|link=yes}}; → Old Egyptian
  • Middle Egyptian – egy-x-middle{{lang|fn=name_from_tag|egy-x-middle|link=yes}}; → Middle Egyptian
  • Late Egyptian – egy-x-late{{lang|fn=name_from_tag|egy-x-late|link=yes}}; → Late Egyptian

Links need to be checked to make sure they go to the correct place; redlinks need redirects. I'll leave that to you. When these tags are used in article space, Module:Lang will create category links. These tags will require new categories. I will also leave that to you.

If Dumaitic is really a language then it needs to be added:

  • Dumaitic – sem-x-dumaitic{{lang|fn=name_from_tag|sem-x-dumaitic|link=yes}}; → Dumaitic

Demotic Egyptian – this is a script, not a language. Ancient North Arabian is known to Module:Lang as xna.

Trappist the monk (talk) 15:01, 17 January 2023 (UTC)

@Trappist the monk: Most of these are fine
sem-x-hatran should link to Hatran Aramaic
sem-x-palmyren should link to Palmyrene Aramaic
sem-x-taymanit should link to Taymanitic
sem-x-egurage should link to Gurage languages (for now, at least)
akk-x-old, akk-x-midbabyl, and akk-x-midassyr should link to Palmyrene Aramaic
Dumaitic appears to be a dialect or language belonging to the Ancient North Arabian family. Its code should redirect to Ancient North Arabian#Dumaitic
Demotic Egyptian denotes both a script and a form of the Egyptian language. Antiquistik (talk) 15:15, 17 January 2023 (UTC)
Ok, added:
  • sem-x-dumaitic{{lang|fn=name_from_tag|sem-x-dumaitic|link=yes}}; → Dumaitic
  • egy-x-demotic{{lang|fn=name_from_tag|egy-x-demotic|link=yes}}; → Demotic Egyptian
Trappist the monk (talk) 16:47, 17 January 2023 (UTC)
@Trappist the monk: Thanks! Antiquistik (talk) 17:04, 17 January 2023 (UTC)
@Trappist the monk: Sorry, but I just noticed a mistake of mine.
I accidently said that akk-x-old, akk-x-midbabyl, and akk-x-midassyr should link to Palmyrene Aramaic, when they should in fact link to Akkadian language. I apologise for my mistake, but could you please correct this?
Links need to be checked to make sure they go to the correct place; redlinks need redirects. I'll leave that to you.
Trappist the monk (talk) 17:47, 17 January 2023 (UTC)
Additionally, the codes seem to not function when used with Template:Transliteration. Could this issue also be fixed? Antiquistik (talk) 17:07, 17 January 2023 (UTC)
{{Transliteration}} does not use IETF language tags; see Template:Transliteration § Usage. It may be that private-use tags should be an exception to that but I'm not sure and will have to think about it. Don't hold your breath.
Trappist the monk (talk) 17:47, 17 January 2023 (UTC)
@Trappist the monk: Can't the Transliteration template be modified to accept private-use tags? Antiquistik (talk) 19:34, 17 January 2023 (UTC)
@Trappist the monk: In fact, I would suggest that the transliteration template be modified to support private-use tags independently of the present issue, seeing as the expansion of Wikipedia's ancient history coverage would inevitably make it a necessity. Antiquistik (talk) 12:48, 18 January 2023 (UTC)
{{transl|egy-x-old|text}}text
Trappist the monk (talk) 15:11, 21 January 2023 (UTC)
@Trappist the monk: Thanks! Antiquistik (talk) 01:14, 4 February 2023 (UTC)
@Trappist the monk: could you please modify the tags akk-x-oldassyr, akk-x-oldbabyl, akk-x-midassyr, akk-x-midbabyl, akk-x-neoassyr, and akk-x-neobabyl so that they render as, for example, "Old Babylonian Akkadian" and "Neo-Assyrian Akkadian" rather than only "Old Babylonian" and "Neo-Assyrian"? Antiquistik (talk) 13:13, 6 February 2023 (UTC)
Do not make me guess at what you really want. Provide a complete list of tags and associated names.
Trappist the monk (talk) 14:43, 6 February 2023 (UTC)
@Trappist the monk: the following tags should render thus:
akk-x-oldassyr → Old Assyrian Akkadian
akk-x-oldbabyl → Old Babylonian Akkadian
akk-x-midassyr → Middle Assyrian Akkadian
akk-x-midbabyl → Middle Babylonian Akkadian
akk-x-neoassyr → Neo-Assyrian Akkadian
akk-x-neobabyl → Neo-Babylonian Akkadian
Thanks in advance. Antiquistik (talk) 20:12, 6 February 2023 (UTC)
akk-x-oldassyr{{lang|fn=name_from_tag|akk-x-oldassyr|link=yes}}; → Old Assyrian Akkadian
akk-x-oldbabyl{{lang|fn=name_from_tag|akk-x-oldbabyl|link=yes}}; → Old Babylonian Akkadian
akk-x-midassyr{{lang|fn=name_from_tag|akk-x-midassyr|link=yes}}; → Middle Assyrian Akkadian
akk-x-midbabyl{{lang|fn=name_from_tag|akk-x-midbabyl|link=yes}}; → Middle Babylonian Akkadian
akk-x-neoassyr{{lang|fn=name_from_tag|akk-x-neoassyr|link=yes}}; → Neo-Assyrian Akkadian
akk-x-neobabyl{{lang|fn=name_from_tag|akk-x-neobabyl|link=yes}}; → Neo-Babylonian Akkadian
Trappist the monk (talk) 20:51, 6 February 2023 (UTC)

Burka (Caucasus)

Hello. I have been looking at Burka (Caucasus) and it is interesting to note that only for Georgian text the tooltip 'Georgian text' appears. Could someone please rectify this? --TadejM my talk 03:10, 22 February 2023 (UTC)

This is about the {{lang-ka}} template at Burka (Caucasus)? If so, that template does not use Module:Lang for rendering so nothing to do here. If the complaint is about the other {{lang-??}} templates on that page, still nothing to do. Because {{lang-??}} templates have a linked prefix label that names the language of the following text, there is no need for a tool tip to redundantly say the same thing.
Trappist the monk (talk) 14:19, 22 February 2023 (UTC)

Template:Lang-yue should display Cantonese

either Cantonese or Yue, not Yue Chinese. RZuo (talk) 10:33, 24 March 2023 (UTC)

The article here is at Yue Chinese. Gonnym (talk) 11:20, 24 March 2023 (UTC)

lang-x3 wanted :)

A few months back, Trappist the monk created {{lang-x2}} etc. I found Uzbek language as another example of this, and started the conversion using the existing tools, which is great, but then increasingly I find things like this (in lead of the article Uzbeks):

Uzbek: Oʻzbek, Ўзбек, اۉزبېک

So it looks like it would be useful to be able to have a {{lang-uz-Latn-Cyrl-Arab}}...? --Joy (talk) 19:13, 15 April 2023 (UTC)

Edit request 10 May 2023

Description of suggested change:

Could you offer a "|bold" parameter for Module:Lang, similar to the "|italic" parameter, please? The motivation is to facilitate the support for MOS:BOLDALTNAMES (in addition to MOS:FOREIGNITALIC). For example, in article CNPq, the native language version of the title should be in boldface (and italics). Currently, the (linked) language name is also formatted in bold, which is unnecessary (and against MOS:BOLDLINKAVOID). The alternative so far has been ignoring MOS:BOLDALTNAMES as in, e.g., UFRGS. I'd like to keep using {{lang-xx}}, thank you! fgnievinski (talk) 18:12, 10 May 2023 (UTC)

Umm, why? Does not this do what you want?
{{langx|pt|'''Conselho Nacional de Desenvolvimento Científico e Tecnológico'''}}
Portuguese: Conselho Nacional de Desenvolvimento Científico e Tecnológico
Trappist the monk (talk) 18:33, 10 May 2023 (UTC)
Thank you, the possibility of entering pre-formatted input -- and the combination between automatic italic and manual bold -- wasn't obvious. I'd suggest considering mentioning this possibility in the documentation. fgnievinski (talk) 02:44, 11 May 2023 (UTC)
If you know how to make the documentation better, bay all means, do so.
Trappist the monk (talk) 12:21, 11 May 2023 (UTC)

issues with uyghur

the redirects Apak Hoja Mazzar and Apaq Xoja Maziri are both tagged with being in uyghur language, so they should automatically be added to Category:Redirects from Uyghur-language terms (currently Category:Redirects from Uighur-language terms (working on move)) but they aren't, even after I've purged the pages and forced link updates using api. greyzxq talk 14:10, 7 May 2023 (UTC)

Not the fault of this template nor of Module:Lang. {{R from alternative language}} does not add redirects to non-existent categories; this section of the template:
{{#if:{{{1|}}}{{{from|}}}{{{lang|}}}
 | [[Category:Redirects from {{#ifexist:Category:Redirects from {{#invoke:Lang|name_from_tag|{{{1|{{{from|{{{lang|}}}}}}}}}}}-language terms
  | {{#invoke:Lang|name_from_tag|{{{1|{{{from|{{{lang|}}}}}}}}}}}
  | non-English
 }}-language terms]]
Because, at the time of this writing, Category:Redirects from Uyghur-language terms does not exist, {{R from alternative language}} does not {{#invoke:Lang|name_from_tag|{{{1|{{{from|{{{lang|}}}}}}}}}}} to get a language name for the category wikilink and instead chooses the 'non-English' text for the category wikilink.
And, just to show that the module is working correctly:
{{#invoke:Lang|name_from_tag|ug}} → Uyghur
Trappist the monk (talk) 14:36, 7 May 2023 (UTC)
The category was renamed last year using "Uighur" on the grounds that this Module:Lang uses Uighur, but I checked Module:Language/data/iana languages and the language code ug actually has two descriptions, Uighur and Uyghur, both copied correctly from IANA language-subtag-registry file. The second descriptions apparently overrides the first when categorising redirects. The category has now been renamed back to Category:Redirects from Uyghur-language terms, and rightly includes five redirects again. Pinging User:TartarTorte for info. – Fayenatic London 21:30, 16 May 2023 (UTC)
Umm, yes and no. Yes: Module:Language/data/iana languages has both Uighur and Uyghur in that order, and no: the second and subsequent optional names recognized by IANA are never used by Module:lang. Module:lang always uses the first (Uighur) unless overridden by Module:Lang/data.
Module:lang did use Uighur until ug → Uyghur was added to Module:Lang/data at these edits pursuant to Module talk:Lang/data § Protected edit request on 8 March 2023.
Trappist the monk (talk) 21:50, 16 May 2023 (UTC)
Trappist the monk summarized it all pretty well. I proposed that change just so a specific category would exist, with no specific preference on my end for the spelling Uighur vs. Uyghur. The change was only proposed because at the time when using Module:Lang with ug input the result was "Uighur". TartarTorte 17:00, 17 May 2023 (UTC)

Varying sizes

Why does {{lang|kn|ABCD}}ABCD produce text of a different size from {{lang|hi|ABCD}}ABCD? Is there a stylesheet to edit somewhere? Shyamal (talk) 07:52, 3 June 2023 (UTC)

For me, on my browser and my operating system, the Latn-script texts in your examples render identically. Do you have a real life example where the rendered size of Kannada text is different from the rendered size of Hindi text?
Trappist the monk (talk) 12:28, 3 June 2023 (UTC)
Here is a temporary image grab on my browser (Firefox) - https://ibb.co/MGd8WQ0 Shyamal (talk) 03:06, 4 June 2023 (UTC)
It's not Module:Lang issue; Module:Lang doesn't specify font size unless directed to with the |size= parameter. The size difference is likely your browser and the font that it uses to render the Kannada text. Try this:
{{lang|kn-Latn|ABCD}}ABCD
{{lang|hi-Latn|ABCD}}ABCD
Are they now the same size? Using the Latn subtag should tell the browser to use its (default?) Latn font for Latn text. How about these:
{{lang|kn|ಕನ್ನಡ}}ಕನ್ನಡ
{{lang|hi|हिन्दी}}हिन्दी
For me on my browser an OS, those two are more-or-less the same size.
Trappist the monk (talk) 12:01, 4 June 2023 (UTC)
Ah, thanks for that. Yes, with the "latn" subtag, it does show up the same size. Shyamal (talk) 12:40, 4 June 2023 (UTC)

Output for template:Transliteration

{{Transliteration}} takes two or three parameters. Output is as follows:

  1. {{Transliteration|uk|palianytsia}}: palianytsia
    • title text (tooltip): Ukrainian-language romanization
  2. {{Transliteration|uk|ukrainian|palianytsia}}: palianytsia
    • title text: Ukrainian National system of romanization

Can it be changed so that the two examples return the following title text?:

  1. Romanization from Ukrainian
  2. Romanization from Ukrainian according to the Ukrainian National system

Thanks.  —Michael Z. 02:35, 5 June 2023 (UTC)

Source parameter for template:Transliteration

Can the following change be made to {{Transliteration}}?:

Add an optional fourth parameter source (“Original foreign-script text”, String, optional).

The source text can appear in the title text (tooltip) to unambiguously show what the transliteration comes from. For example, the tooltip for palianytsia that currently appears as Ukrainian-language romanization would be Ukrainian-language romanization of паляниця.

This would allow us to write articles in the same style as many academic and popular-academic sources do, with only romanized foreign terms in the text, but giving readers easy direct access to the original source, eliminating uncertainty of transliterations for those familiar with foreign scripts, but with less clutter in the readable text.

Thanks.  —Michael Z. 02:43, 5 June 2023 (UTC)

Missing language code "emen"

The ISO 639-6 code "emen" for Early Modern English is not recognized: [plodan] Error: {{Lang}}: unrecognized language tag: emen (help)  — SMcCandlish ¢ 😼  23:53, 15 June 2023 (UTC)

Yep. The ISO 639-6 standard has been withdrawn. ISO 639-6 tag definitions are not included in the IANA language-subtag-registry file. For these reasons, Module:Lang does not support emen or any other ISO 639-6 language tags. Module:Lang does support the IETF language tag en-emodeng (Early Modern English (1500-1700) variant of English):
{{lang|en-emodeng|plodan}}plodan
Trappist the monk (talk) 00:23, 16 June 2023 (UTC)
Ah so. Thanks for the info.  — SMcCandlish ¢ 😼  18:37, 18 June 2023 (UTC)

Template-protected edit request on 26 July 2023

{{transl}} was renamed to {{transliteration}} back in 2022 due to potential ambiguity with {{translation}}, as both transliteration and translation share the transl part. In fact, {{translation}} also produces the exact text transl.

While using transliteration today, {{transliteration|sa||qwerty}} causes the error "Error: {{Transl}}: unrecognized transliteration standard". This error message is produced someplace in this module. Hence, I request someone who understands Lua to change this error message, and while they are at it, to change every instance of "transl" to "transliteration", so the code is not ambiguous in future. Thanks! CX Zoom[he/him] (let's talk • {CX}) 12:35, 26 July 2023 (UTC)

I would but Editor Gonnym has, I think, put a procedural block in place by nominating Category:Transl template errors to be speedy moved. The notification requires a 48 hour wait after which a bot will make the move. If I modify Module:Lang, it will put articles into a non-existent Category:Transliteration template errors cat. Someone may see that and create the category which will bugger up the normal category-move process. Sigh...
Trappist the monk (talk) 17:27, 26 July 2023 (UTC)
@Trappist the monk: So, should we wait until the bot moves the category? It would have to be perfectly-timed with the bot action anyway because the module will otherwise populate the non-existent category once the move is done. Alternatively, I personally think a bit of WP:IAR can do it considering that there has already been a consensus in favour of "transliteration", and it is unlikely that someone will oppose uniformity with template name, module function. CX Zoom[he/him] (let's talk • {CX}) 18:35, 26 July 2023 (UTC)
Yeah, I know, but I seem to recall having been chastised for doing XfD stuff out of process; this particular process apparently requires 48 hours for discussion – the notice template is rather emphatic about "don't do these things". Had the category not been put in process, I would have moved it as part of the module update.
Precision timing is not really required. Presumably Category:Transl template errors will go away. Perhaps someone will notice that there is a red category link and recreate it; after the module update, if someone has recreated Category:Transl template errors and no one has entered it into some CfD process, I'll just delete it as surplus to requirements.
Trappist the monk (talk) 19:54, 26 July 2023 (UTC)

Edit request 3 June 2023

Description of suggested change: Please copy the sandbox code over to the main template; I've added a condition to html_tag_select() to handle what may seem a reductive case: Making sure to select <div>...</div> wrapping if the input text to be wrapped already contains any <div>...</div> tags.

This is to handle a real-world case: on Republican Palace, Khartoum, {{Tweet}} is used to present a tweet in Arabic, where the actual tweet content is set using {{rtl-para}}. This results in the template calling {{lang-ar|{{rtl-para|The tweet content}}}}, which in the current version of the module results in this HTML:

<div style="color: #1c2022; text-align: left">
<a href="/wiki/Arabic_language" class="mw-redirect" title="">Arabic</a>: <span lang="ar" dir="rtl"><div dir="rtl" style="text-align:right">بسم الله الرحمن الرحيم <br>
<p>قوات الدعم السريع <br>
بيان هام<br>
9 مايو 2023<br>
</p>
 نفذت قيادة القوات الانقلابية وفلول النظام البائد المتطرفة اليوم هجوم بالطيران على القصر الجمهوري القديم باستخدام صواريخ مما أدى إلى تدميره.</div></span>
         </div>

A div inside a span is invalid, and will land the page on the linter-error reports.

I've also added a new test at the bottom of Module:Lang/testcases which exercises these aspects of html_tag_select(). (Some cases are, therefore, currently failing, as the sandbox code correctly wraps the content in <div>...</div> instead of <span>...</span>.) FeRDNYC (talk) 14:33, 3 June 2023 (UTC)

done
Trappist the monk (talk) 14:58, 3 June 2023 (UTC)
These changes appear to have caused a (very) few scattered Linter errors. It is unclear to me at this time whether it is worth adjusting the few articles or the module itself. Examples: misnested italics in the infobox at Een Bloemhof, and misnested italics and a missing closing </p> at Kolonna Eterna and Das Kapital, Volume I. These errors may be due to misuse of this or other templates. Feedback is welcome. – Jonesey95 (talk) 13:56, 4 June 2023 (UTC)
I don't spend any time chasing linter errors. If you preview these articles using this version of the module (edit that version and put an article title in the Preview page with this template text box and click the adjacent Show preview button, do the problems go away?
Two of your example articles use some sort of collapse template in the {{infobox book}} |title_orig= parameter. The infobox template wraps whatever is assigned to |title_orig= with {{lang}}.
If you fix the {{quote}} template at Kolonna Eterna § Plaque, does the problem go away?
Trappist the monk (talk) 14:56, 4 June 2023 (UTC)
I didn't notice that the Quote template was broken there, but moving the {{center}} template outside of the lang template seems to have fixed that syntax misnesting. As for the others, I unhid the content per MOS:HIDE, which also fixed the Linter error. If I come across any errors that can't be fixed by actually fixing something in the page (technical or MOS-related), I will post again here. – Jonesey95 (talk) 15:49, 4 June 2023 (UTC)
Couldn't you just change the div to a span style="display:block", and then you can embed the other span within it, while still getting block style for the outside span? Mathglot (talk) 07:24, 27 July 2023 (UTC)

Hindustani language

Is there a code for Hindustani language, without speciying whether Hindi or Urdu?-- Carnby (talk) 06:46, 27 July 2023 (UTC)

Not a general one for what you want; there is 'hns', but it only applies to Caribbean Hindustani. Mathglot (talk) 07:13, 27 July 2023 (UTC)
I asked that because in Names of Jesus there were two names in two different alphabets for Hindi and Urdu but only one transliteration.-- Carnby (talk) 16:27, 27 July 2023 (UTC)
You mean in some other article, perhaps? I don't see it there. Mathglot (talk) 01:14, 28 July 2023 (UTC)
Sorry, it was Jesus (name).-- Carnby (talk) 04:57, 28 July 2023 (UTC)
We don't have to get into the subtleties of pluricentric languages and what it means to talk about Hindustani language versus Hindi or Urdu to resolve this. The usage in that table row makes it clear that you have two expressions in the name variant cell in different scripts which are identified with two languages for which ISO-639 does have codes, and so what you want is two {{lang}} templates, one each with the standard code for Hindi, and for Urdu. The reasons for this include proper font choice in browsers, screen reader accessibility, spell-checkers, and others, and are enumerated in full at Template:Lang#Rationale. Using a common "hindustani" code for both, if one existed, would only hinder and undermine these goals.
Another approach would be to just break the table row up into two rows, one each for each of the two variants, and that will likely be much less confusing for most people reading the table, who probably never realized the digraphia issue sitting at the heart of Hindi–Urdu, and for the purpose of understanding the Jesus (name) table, they really don't need to. Personally, I'd favor that approach as making the most sense for this article. Notice that the table has two separate rows for Serbian and Croatian in in the table (which I agree with), although they could have just as easily had one row labeled Serbo-Croatian with two expressions in the cell, one each in Latin and in Cyrillic. The situation for Hindi–Urdu is virtually identical to that of Serbo-Croatian, and there should be two rows for it as well. The Jesus (name) article is not the place to go into explanations or footnotes about linguistic digraphia, so: two rows for Serbian and Croatian, and two rows for Hindi and Urdu. Mathglot (talk) 18:03, 28 July 2023 (UTC)
Fixed. You could check. Thank you.-- Carnby (talk) 19:13, 28 July 2023 (UTC)
Yes, that looks fine, now. You're welcome. Mathglot (talk) 06:53, 2 August 2023 (UTC)

Is this template used correctly in this edit?

Is this template used correctly in this edit? Seems weird to italicize Helsinki, Alvar Aalto, etc. (pinging Permikk). 85.76.99.0 (talk) 18:41, 22 September 2023 (UTC)

Though it is editorially tedious and not many articles are doing it yet, it is arguably appropriate to use the template, so that screen-readers correctly pronounce the Finnish names (at least in theory). However, since these are also the names of these places in English too (unlike, say, Munich versus München, or Moscow versus Moskva), they should not be italicized, and this is effectuated by adding the |italic=unset parameter.  — SMcCandlish ¢ 😼  19:39, 22 September 2023 (UTC)

New codes

@Trappist the monk: I need private-use tags for Sarmatian, Saka, Alanian, Proto-Indo-Aryan, and Mitanni-Aryan. Antiquistik (talk) 04:37, 27 September 2023 (UTC)

What tags do you want to add?
Trappist the monk (talk) 15:07, 27 September 2023 (UTC)
@Trappist the monk: I need a tag for each of these languages:
  • Sarmatian
  • Saka
  • Alanian
  • Proto-Indo-Aryan
  • Mitanni-Aryan
Antiquistik (talk) 04:28, 3 October 2023 (UTC)
I think Trappist means what specific codes do you want to add, from what sources? Simply re-formatting the same vague request in list shape doesn't provide any additional information.  — SMcCandlish ¢ 😼  08:36, 3 October 2023 (UTC)
Yeah, that ↑.
Trappist the monk (talk) 11:12, 3 October 2023 (UTC)
Sarmatian doesn't appear to be a language, and there is no code for it (that WP knows of). The generic xsc for Scythian is probably appropriate, unless you know the material is more specifically Alanian or Old Ossetian. Saka already has two codes, depending on dialect: kho and xtq. Alanian is already covered (xln). The proto-languages don't have codes (that we know of), and aren't really languages but scholarly approximations of what some of their reconstruction might be. "Mitannia-Aryan" isn't a language but an Indo-Aryan superstrate in Mitanni in the Hurrian language used there; Hurrian is xhu.  — SMcCandlish ¢ 😼  08:43, 3 October 2023 (UTC)
@Trappist the monk: @SMcCandlish: My apologies, I misunderstood what Trappist meant. For the codes, here is what I need:
  • Sarmatian is part of the Scythian languages family and is also ancestral to Alanian, which is itself ancestral to Ossetian, so a code derived from either xsc, xln or os is acceptable
  • By "Saka," I mean the Old Iranian phase of the language which evolved into Khotanese and Tumshqese. Since it was a member of the Scythian languages family, a code derived from xsc is preferable
  • For Proto-Indo-Aryan, I need a code to be able to represent their reconstructions in pages where I need to mention said reconstructions. Therefore a code derived from inc would be preferable.
  • Mitanni-Aryan indeed means the language of the Indo-Aryan superstrate in Mitanni. I need a code derived from inc to be able to represent the reconstructions of terms from this language.
In addition to these, I also need a code to represent Pontic Scythian. Since it was a member of the Scythian languages, a code derived from xsc is preferable.
Antiquistik (talk) 16:09, 3 October 2023 (UTC)
But you don't "need" any such codes. You can use existing codes as appropriate and when there is no code just use italics (for renderings in Latin orthography) or no markup (for renderings in other character sets). Wikipedia does not "derive" new codes from existing source-attested ones.  — SMcCandlish ¢ 😼  16:31, 3 October 2023 (UTC)
Sure we do. If it is desirable to create a {{lang-??}} template for Proto-Indo-Aryan and have it link to the en.wiki article Proto-Indo-Aryan language then {{lang-inc}} won't do because (currently) {{lang|fn=name_from_tag|inc|link=yes}}Indic languages links to a dab page (which does not list Proto-Indo-Aryan). If it is desirable to write a {{lang}} template for some Proto-Indo-Aryan text without the {{lang-??}} language name prefix, {{lang|inc|...}} won't do because the tool-tip 'Indic languages collective text' won't be right for Proto-Indo-Aryan. There are quite a few 'derived' tags listed at Template:Lang § Private-use language tags.
Trappist the monk (talk) 17:35, 3 October 2023 (UTC)
Okay, wasn't aware of that. What purpose do they serve? The main rationale for lang markup is helping text-to-speech pronounce things correctly, but I don't see how any WP-specific private-use codes could help with that, since they won't be supported by third-party screen-reader software.  — SMcCandlish ¢ 😼  17:41, 3 October 2023 (UTC)
I thought I just gave a couple of examples: linking to the proper en.wiki article and tool tips. For pronunciation, text-to-speech systems don't know about private use subtags which is why Module:Lang provides only the base language tag in the lang= html attribute:
{{lang|la-x-new|New Latin text}}
<span title="New Latin-language text"><i lang="la">New Latin text</i></span>
New Latin text
{{langx|la-x-new|New Latin text}}
[[New Latin language|New Latin]]: <i lang="la">New Latin text</i>
New Latin: New Latin text
Trappist the monk (talk) 18:06, 3 October 2023 (UTC)
@Trappist the monk: In this case, here is where these codes should redirect:
@SMcCandlish: I wish it were that simple, but English Wikipedia often requires that pages or sections which use languages other than English to be appropriately marked as such, hence why I need these codes. Antiquistik (talk) 07:01, 4 October 2023 (UTC)
Still need to know that tags you want to add.
Trappist the monk (talk) 13:08, 4 October 2023 (UTC)
@Trappist the monk: I am not sure I understand your question. Antiquistik (talk) 14:31, 4 October 2023 (UTC)
Really? You want me to add some private use tags. I need to know what those tags are before I can add them. You know the rules for a private use tag because we've been through this exercise before. Create a list of language-appropriate private use tags for the languages you enumerated above and I will add them.
Trappist the monk (talk) 15:00, 4 October 2023 (UTC)
@Trappist the monk: Here's the list:
Antiquistik (talk) 04:45, 5 October 2023 (UTC)
done; you will need to make the Mitanni redirect.
  • {{lang|fn=name_from_tag|xsc-x-sarmat|link=yes}}Sarmatian
  • {{lang|fn=lang_xx_inherit|code=xsc-x-sarmat|Sarmatian text}}Sarmatian: Sarmatian text
  • {{lang|xsc-x-sarmat|Sarmatian text}}Sarmatian text
    • <span title="Sarmatian-language text"><i lang="xsc">Sarmatian text</i></span>
  • {{lang|fn=name_from_tag|xsc-x-saka|link=yes}}Saka
  • {{lang|fn=lang_xx_inherit|code=xsc-x-saka|Saka text}}Saka: Saka text
  • {{lang|xsc-x-saka|Saka text}}Saka text
    • <span title="Saka-language text"><i lang="xsc">Saka text</i></span>
  • {{lang|fn=name_from_tag|inc-x-proto|link=yes}}Proto-Indo-Aryan
  • {{lang|fn=lang_xx_inherit|code=inc-x-proto|Proto-Indo-Aryan text}}Proto-Indo-Aryan: *Proto-Indo-Aryan text
  • {{lang|inc-x-proto|Proto-Indo-Aryan text}}*Proto-Indo-Aryan text
    • <span title="Proto-Indo-Aryan-language text">&#42;<i lang="inc">Proto-Indo-Aryan text</i></span>
  • {{lang|fn=name_from_tag|inc-x-mitanni|link=yes}}Mitanni-Aryan
  • {{lang|fn=lang_xx_inherit|code=inc-x-mitanni|Indo-Aryan superstrate in Mitanni text}}Mitanni-Aryan: Indo-Aryan superstrate in Mitanni text
  • {{lang|inc-x-mitanni|Indo-Aryan superstrate in Mitanni text}}Indo-Aryan superstrate in Mitanni text
    • <span title="Mitanni-Aryan-language text"><i lang="inc">Indo-Aryan superstrate in Mitanni text</i></span>
Trappist the monk (talk) 13:41, 5 October 2023 (UTC)
Thanks for all of these!
I also need a code xsc-x-pontic Pontic Scythian that redirects to Pontic Scythian language. Antiquistik (talk) 02:50, 6 October 2023 (UTC)
done.
  • {{lang|fn=name_from_tag|xsc-x-pontic|link=yes}}Pontic Scythian
  • {{lang|fn=lang_xx_inherit|code=xsc-x-pontic|Pontic Scythian text}}Pontic Scythian: Pontic Scythian text
  • {{lang|xsc-x-pontic|Pontic Scythian text}}Pontic Scythian text
    • <span title="Pontic Scythian-language text"><i lang="xsc">Pontic Scythian text</i></span>
Trappist the monk (talk) 12:09, 6 October 2023 (UTC)
@Trappist the monk: Thanks. Antiquistik (talk) 13:58, 6 October 2023 (UTC)

Using wikilink, multiple languages and lang together doesn't work in the article namespace?

The following wikitext:

The film won the [[Lumières Award for Best Film|{{Lang|fr|Lumières|italics=no}} Award for Best Film]] at the [[26th Lumières Awards|2021 {{Lang|fr|Lumières|italics=no}} Awards]].

produces in the article namespace:

The film won the [[Lumières Award for Best Film|Lumières Award for Best Film]] at the [[26th Lumières Awards|2021 Lumières Awards]].

but in other namespaces it renders correctly:

The film won the Lumières Award for Best Film at the 2021 Lumières Awards.

So, why don't this kind of wikilinks using this template work in the article namespace? Are there any workarounds? 2001:14BA:9CE5:8400:4472:8F34:8ECC:6098 (talk) 13:19, 17 October 2023 (UTC)

This is why templates have documentation. For this issue see Template:Lang § Links
Trappist the monk (talk) 13:46, 17 October 2023 (UTC)
Thanks. But unfortunately the documentation doesn't have examples for creating a wikilink that has multiple languages, e.g. French and English like in my examples above. I mean, I can make a link like
{{Lang|fr|[[Lumières Award for Best Film]]|italics=no}}
(Lumières Award for Best Film)
but then it marks "Award for Best Film" as French. So, if using wikilink, multiple languages and lang together isn't possible, then I guess the closest you can get is probably something silly like
{{Lang|fr|[[Lumières Award for Best Film|Lumières]]|italics=no}} [[Lumières Award for Best Film|Award for Best Film]]
(Lumières Award for Best Film).
2001:14BA:9CE5:8400:4472:8F34:8ECC:6098 (talk) 14:33, 17 October 2023 (UTC)
The rendering of your first example is broken in mainspace because it contains a category wikilink (the other namespaces are not categorized):
[[Lumières Award for Best Film|<span title="French-language text"><span lang="fr" style="font-style: normal;">Lumières</span></span>[[Category:Articles containing French-language text]] Award for Best Film]]
[[Lumières Award for Best Film|Lumières Award for Best Film]]
MediaWiki cannot link a single piece of text to multiple targets. You can get round that by setting |cat=no; see Template:Lang §§ Syntax and usage​ and Parameters. The downside is that the article might not be properly categorized.
Trappist the monk (talk) 16:03, 17 October 2023 (UTC)