Template talk:Lang/Archive 13
![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 10 | Archive 11 | Archive 12 | Archive 13 |
Are there times this template shouldn't be used?
Should all text in a foreign language have this template? Should books, building names etc. also use this? I ask from a position of complete ignorance on the point! Cheers - SchroCat (talk) 16:34, 28 October 2023 (UTC)
{{lang}}
should not be used in citation templates ({{cite book}}
etc.) except in the|quote=
parameter (though I think that if a quotation is important to the article, the quotation should be placed in the article body and properly cited – quotations need citations, citations do not need quotations). Outside of citation templates, I think that{{lang}}
should be used for all non-English text so that browsers display the text using appropriate fonts and screen readers have the opportunity to pronounce the non-English text as it should be pronounced.- —Trappist the monk (talk) 16:56, 28 October 2023 (UTC)
- So! A bit of backstory, but it shouldn't be too technical: This template has to do with the HTML standard, which semantically organizes documents. It takes care of underlying HTML markup: according to the standard, all documents must declare their language (or specifically declare an unknown or no language). Since this is the English Wikipedia, at the very top of the document, it declares that the whole page (the root
<html>...</html>
) is in English with thelang="en"
parameter. Documents without alang
parameter are invalid. You can read more here, at MDN. - Specific parts within the document, actually any HTML tag, can have another language specified. This is very important for applications like screen readers (which can switch to a voice spoken in another language), for example. Screen readers are a good example of the general issue: logically, the document has said it's in English. If there's non-English text there that doesn't declare it's in another language, this makes the document's statement incorrect, and can lead to problems if software is built to take advantage of HTML language specification.
- As stated on the template page, the place it shouldn't be used is in certain citation templates, because the order in which templates are parsed becomes an issue, and it clogs the citation metadata. There are parameters within those templates that allow you to specify when that metadata is in another language, which will appropriately apply the
lang
parameter within the HTML document.
So that is to say: yes, absolutely. If a word is not an English word, it should be tagged. (Though, of course, with place names and such, the boundary is distinctly less clear, so I am not bemoaning that. But keep the principle in mind!) Remsense聊 17:00, 28 October 2023 (UTC)- Excellent - thanks very much to you both. Cheers - SchroCat (talk) 18:59, 28 October 2023 (UTC)
- In practice, lang templates have generally not been used with proper names very much in our articles, though probably they should be, e.g.
{{lang|ga|Caoimhín Ó Raghallaigh|italic=unset}}
– that last parameter to keep from italicizing it, since we wouldn't italicize a personal or geographical name, except when contrasting it with an anglicization, as in "Munich (German: München)". It would actually be helpful to screen readers and such to use the template this way (I shudder to think what a screen reader does when trying to interpret "Caoimhín Ó Raghallaigh" as something to pronounce as if it's English), but it would be a really large job to actually implement that, and some resistance might be met, since it complicates the wikicode. — SMcCandlish ☏ ¢ 😼 01:11, 29 October 2023 (UTC)- SMcCandlish, with regard to 'probably should be used more', I've just gone and created
{{langr}}
(for 'roman') that's a quick alias for{{lang|italic=unset}}
. I know it's a few characters, but the lack of an extra parameter really seems to incentivize the quicker use of templates—does for me anyhow. — Remsense聊 01:29, 29 October 2023 (UTC)- Thank you for that gift! I don't think I will fix the thousand of "italic=no", but one letter instead of an extra parameter is a relief! Perhaps a bot could change the older ones, to make users aware it exists. --Gerda Arendt (talk) 07:29, 29 October 2023 (UTC)
- Gerda Arendt, i certainly think it's worth the extra category entry/name to remember/what have you, it's a relief that others seem to agree :)! i just tend to swap it out in articles i'm editing to make things easier to read within the article (alongside adding to other places of course) — Remsense聊 10:48, 29 October 2023 (UTC)
- Thank you for that gift! I don't think I will fix the thousand of "italic=no", but one letter instead of an extra parameter is a relief! Perhaps a bot could change the older ones, to make users aware it exists. --Gerda Arendt (talk) 07:29, 29 October 2023 (UTC)
- Hopefully that will actually work out in getting people to use it. — SMcCandlish ☏ ¢ 😼 02:09, 29 October 2023 (UTC)
- I will be using it, in any case. My main thing is Chinese, and the screenreader I tested doesn't do very well with nondiacritical pinyin, even though it could, so I was wondering if there was even a point to tagging it, but I definitely should regardless, per my own essay above. Remsense聊 02:15, 29 October 2023 (UTC)
- I tried an implementation of this in a live article [1] at Caoimhín Ó Raghallaigh (along with some other cleanup there). I haven't pored over the code of
{{langr}}
, but I assume it passes-through other parameters like for RtL text, etc. As for Chinese rendering, I'm really not sure what the best approach is, when it comes to various different romanization systems. There may be advice about this somewhere, at Wikipedia:Manual of Style/China- and Chinese-related articles or talk page thereof, or at Template:Lang-zh. May need to account for parameters that specify transliteration. — SMcCandlish ☏ ¢ 😼 02:36, 29 October 2023 (UTC)- SMcCandlish, all it does is call the same module
{{lang}}
does, but sets the italics parameter for you. So, if it has issues, I would be really worried! — Remsense聊 02:38, 29 October 2023 (UTC)- Ah, I think it will need to handle additional parameters of
{{lang}}
, like|rtl=
and|size=
and definitely|nocat=
and|cat=
, in a pass-through manner. I don't know if any of the special parameters for{{lang-zh}}
are also supported (or needed) by{{lang|zh}}
. — SMcCandlish ☏ ¢ 😼 02:43, 29 October 2023 (UTC)- I will do some testing of those ASAP, thanks for letting me know. Remsense聊 02:44, 29 October 2023 (UTC)
- Update: I don't think you need to do anything manually to the template code. I'm really old-school with templates, and don't spend much time messing about with Lua modules; it wasn't clear to me that by invoking the same module it just auto-handles the parameters. I just tested
[[Caoimhín Ó Raghallaigh|{{langr|ga|Ó Raghallaigh|nocat=y}}]]
in a mainspace sandbox (the categorization stuff only happens in mainspace), and it worked fine. If the module wasn't "magically" getting the|nocat=y
despite it not being explicitly named in the template code, then the link would have been mangled, by having a category link jammed inside of it. — SMcCandlish ☏ ¢ 😼 12:09, 29 October 2023 (UTC)
- Update: I don't think you need to do anything manually to the template code. I'm really old-school with templates, and don't spend much time messing about with Lua modules; it wasn't clear to me that by invoking the same module it just auto-handles the parameters. I just tested
- I will do some testing of those ASAP, thanks for letting me know. Remsense聊 02:44, 29 October 2023 (UTC)
- Ah, I think it will need to handle additional parameters of
- SMcCandlish, all it does is call the same module
- I tried an implementation of this in a live article [1] at Caoimhín Ó Raghallaigh (along with some other cleanup there). I haven't pored over the code of
- I will be using it, in any case. My main thing is Chinese, and the screenreader I tested doesn't do very well with nondiacritical pinyin, even though it could, so I was wondering if there was even a point to tagging it, but I definitely should regardless, per my own essay above. Remsense聊 02:15, 29 October 2023 (UTC)
- SMcCandlish, with regard to 'probably should be used more', I've just gone and created
- In practice, lang templates have generally not been used with proper names very much in our articles, though probably they should be, e.g.
- Excellent - thanks very much to you both. Cheers - SchroCat (talk) 18:59, 28 October 2023 (UTC)
Whole-page wrapper idea
"but it would be a really large job to actually implement that, and some resistance might be met, since it complicates the wikicode
"
- That's why we need some template that will be wrapped around the whole article with lang parameters for every non-English word used in the article. E.g. in Alvar Aalto:
{{Lang-wrapper|fi=Alvar,Aalto,Aino,Jyväskylä|sv=Ahlström-Gullichsen|de=Gesamtkunstwerk|article= *START OF THE ARTICLE; i.e. {{Short description}}, {{Infobox}} etc.* '''Hugo Alvar Henrik Aalto''' ({{IPA-fi|ˈhuːɡo ˈɑlʋɑr ˈhenrik ˈɑːlto|pron}}; 3 February 1898 – 11 May 1976) was a Finnish [[architect]] and designer.<ref name=Chilvers>{{harvnb|Chilvers|2004|p=1}}</ref> His work includes architecture, furniture, [[textiles]] and [[glassware]], as well as sculptures and paintings. He never regarded himself as an artist, seeing painting and sculpture as "branches of the tree whose trunk is architecture."<ref name=Enckell>{{harvnb|Enckell|1998|p=32}}</ref> Aalto's early career ran in parallel with the rapid economic growth and industrialization of Finland during the first half of the 20th century. Many of his clients were industrialists, among them the [[Ahlström-Gullichsen family]], who became his patrons.<ref name="Ahlström">{{harvnb|Anon|2013}}</ref> The span of his career, from the 1920s to the 1970s, is reflected in the styles of his work, ranging from [[Nordic Classicism]] of the early work, to a rational [[International Style (architecture)|International Style]] Modernism during the 1930s to a more organic modernist style from the 1940s onwards. His architectural work, throughout his entire career, is characterized by a concern for design as [[Gesamtkunstwerk]]—a ''total work of art'' in which he, together with his first wife [[Aino Aalto]], would design not only the building but the interior surfaces, furniture, lamps, and glassware as well. His furniture designs are considered [[Scandinavian design|Scandinavian Modern]], an aesthetic reflected in their elegant simplification and concern for materials, especially wood, but also in Aalto's technical innovations, which led him to receiving patents for various manufacturing processes, such as those used to produce bent wood.<ref name=Boy>{{harvnb|Boyce|1985|p=1}}</ref> As a designer he is celebrated as a forerunner of [[Mid-century modern|midcentury modernism]] in design; his invention of bent plywood furniture<ref>{{Cite book|last=Norwich|first=John Julius|title=Oxford Illustrated Encyclopedia of the Arts|publisher=Oxford University Press|year=1990|isbn=978-0-19-869137-2|location=US|pages=1}}</ref> had a profound impact on the aesthetics of [[Charles and Ray Eames]] and [[George Nelson (designer)|George Nelson]].<ref>{{Cite web|title=Alvar Aalto|url=https://www.dwr.com/designer-alvar-aalto?lang=en_US|website=www.dwr.com}}</ref> The [[Alvar Aalto Museum]], designed by Aalto himself, is located in what is regarded as his home city, [[Jyväskylä]].<ref>{{harvnb|Alvar Aalto Museum|2011}}</ref> (...) *END OF THE ARTICLE; i.e. navigation boxes, [[Category:Finnish people]] etc.* }} (-> closing curly brackets of "Lang-wrapper")
- So,
|fi=Alvar,Aalto,Aino,Jyväskylä
would mark all occurrences of the words Alvar, Aalto, Aino and Jyväskylä as Finnish-language text in the whole article,|sv=Ahlström-Gullichsen
would mark Ahlström-Gullichsen as Swedish-language text and|de=Gesamtkunstwerk
would mark Gesamtkunstwerk as German-language text. Now I don't know if this is technically possible to implement, so this is just an idea for now. 2001:14BA:9CE5:8400:9D39:7444:AD64:FBB1 (talk) 03:02, 29 October 2023 (UTC)- That seems particularly resource intensive and non-canonical for how Wikipedia operates. Remsense聊 03:06, 29 October 2023 (UTC)
- I'm not sure that it's technically even doable. Even if it were, there are instances where the underlying HTML
lang="xx"
markup cannot be imposed (with<span>...</span>
or otherwise), e.g. on most parameter values in citation templates other than|quote=
. Or on terms that are bare wikilinks or are on the left side of piped links. Or terms inside URLs. Or .... And certainly nothing like this would be done as a page-wide wrapper for the entire article content. Ever. For any reason. — SMcCandlish ☏ ¢ 😼 06:40, 29 October 2023 (UTC)
- I'm not sure that it's technically even doable. Even if it were, there are instances where the underlying HTML
- That seems particularly resource intensive and non-canonical for how Wikipedia operates. Remsense聊 03:06, 29 October 2023 (UTC)
HTML code streamlining question
![](http://upload.wikimedia.org/wikipedia/en/thumb/f/fb/Yes_check.svg/20px-Yes_check.svg.png)
Is there a good reason this is emitting double spans, or a span plus italics?
Given code of the form {{lang|ga|srón}}
and {{lang|ga|Pádraig|italic=unset}}
, the output is, respectively:
<span title="Irish-language text"><i lang="ga">srón</i></span>
<span title="Irish-language text"><span lang="ga">Pádraig</span></span>
That looks like code bloat, and would be better rendered as:
<span title="Irish-language text" lang="ga"><i>srón</i></span>
<span title="Irish-language text" lang="ga">Pádraig</span>
using a single span for language-related metadata, and just adding a bare <i>...</i>
if it is needed.
Likewise for other parameter stuff that needs to translate into language-related metadata. E.g. {{lang|he|עבר}}
gives:
<span title="Hebrew-language text"><span lang="he" dir="rtl">עבר</span></span>
which would be leaner and cleaner as:
<span title="Hebrew-language text" lang="he" dir="rtl">עבר</span>
— SMcCandlish ☏ ¢ 😼 11:50, 29 October 2023 (UTC)
- Template talk:Lang/Archive 11 § Lang and title param
- —Trappist the monk (talk) 12:03, 29 October 2023 (UTC)
- Ah, yes, that would explain it. Thank you. — SMcCandlish ☏ ¢ 😼 12:12, 29 October 2023 (UTC)
Inline translations
Is there a mechanism for including English language translations of foreign terms?
Currently I'm using efn
for this:
the {{lang|fr|Nid de la Poule}}{{efn|Hen's Nest}} crater
...{{notelist}}
Which produces this (normally the note is displayed in a tooltip):
the Nid de la Poule[a] crater
- ^ Hen's Nest
Something like this would be cleaner though:
the {{lang|fr|Nid de la Poule|translation=Hen's Nest}} crater
See, e.g., Puy_de_Dôme#Tourism
Alex Hajnal (talk) 22:33, 5 November 2023 (UTC)
- Not in
{{lang}}
but you might rewrite that sentence somehow and use:The summit can be reached by two [[Trail|pedestrian paths]]: a southern one ({{lang-fr|Le sentier des muletiers|translation=The Mule Trail}}, formerly a [[Roman road]]) and a northern one ({{lang-fr|Le sentier des chèvres|translation=The Goat Trail|label=none}}) which runs past the {{lang-fr|Nid de la Poule|translation=Hen's Nest|label=none}} crater.
- The summit can be reached by two pedestrian paths: a southern one (French: Le sentier des muletiers, lit. 'The Mule Trail', formerly a Roman road) and a northern one (Le sentier des chèvres, 'The Goat Trail') which runs past the Nid de la Poule, 'Hen's Nest' crater.
- or just include the translations parenthetically in the sentence:
...the {{lang|fr|Nid de la Poule}} ('Hen's Nest') crater
→ ...the Nid de la Poule ('Hen's Nest') crater
- —Trappist the monk (talk) 23:06, 5 November 2023 (UTC)
- Do you think there's anything inherently wrong with using
efn
for this? Edit: I presume usinglang-fr
would be highly enouraged.Alex Hajnal (talk) 23:16, 5 November 2023 (UTC)- You can pretty-much do what you want. From a reader's point of view, using
{{efn}}
for such short translations seems to require more work than perhaps it's worth because the reader has to, at minimum, float their mouse-pointer over the{{efn}}
superscript in order to see what is hidden there. I neither encourage nor discourage the use of{{lang-fr}}
; I merely offer it as an option that you can consider. - —Trappist the monk (talk) 23:35, 5 November 2023 (UTC)
- Definitely the most common way to do this is with
{{lang}}
and plain-English after it: ...the {{lang|fr|Nid de la Poule|italic=unset}} ('Hen's Nest') crater
→ ...the Nid de la Poule ('Hen's Nest') crater- or
...the {{lang|fr|Nid de la Poule|italic=unset}} crater (the name of which means 'Hen's Nest')
→ ...the Nid de la Poule crater (the name of which means 'Hen's Nest')- (with
|italic=unset
in this specific kind of case because we don't italicize proper names in most cases). It requires no footnote futzing-around for the reader, and is more flexible and less template-geeky for the editor, compared to something like: ...the {{lang-fr|Nid de la Poule|translation=Hen's Nest|label=none|italic=unset}}, crater
→ ...the Nid de la Poule, 'Hen's Nest', crater- Japanese is kinda-conventionally a special case, often done with a complex template called
{{Nihongo}}
, which participants at WP:JAPAN are big fans of, but some of us are not, at least not for cases of this sort (versus, perhaps, the opening line of an article on Japanese subject). — SMcCandlish ☏ ¢ 😼 15:01, 6 November 2023 (UTC) - OK, thanks for the feedback.
- My rationale was to not break up the flow of the sentences too much with a lot of clauses and parentheticals. Of course, requiring/encouraging the mousing-over of the superscript breaks the flow as well. Bit of a double-edged sword.
- Browsing though the docs it looks like Template:tooltip is also an option:
{{lang|fr|{{tooltip|Nid de la Poule|Hen's Nest}}}}
- Giving:
Nid de la Poule
- Thanks again.
- Definitely the most common way to do this is with
- You can pretty-much do what you want. From a reader's point of view, using
- Do you think there's anything inherently wrong with using
Needs Proto-Germanic
If it's already there, then it just needs to be set to understand Wiktionary's gem-pro code as referring to Proto-Germanic and to add the necessary italics and HTML tags. — LlywelynII 00:38, 11 December 2023 (UTC)
{{lang|fn=name_from_tag|gem-x-proto}}
→ Proto-Germanic – listed at Template:Lang § Private-use language tags.gem-pro
is not a valid IETF language tag. To be valid, the extlang subtag must be defined in the IANA language-subtag-registry file. That file does not listpro
as an extlang. Because all currently defined extlangs refer to languages that have primary language tags, Module:Lang does not support extlangs.- —Trappist the monk (talk) 01:43, 11 December 2023 (UTC)
- Can't this be done (using some code or other) with the private-use codes described in #New codes, above? I wouldn't mind having one for Proto-Celtic using
cel-
as the base. — SMcCandlish ☏ ¢ 😼 22:51, 11 December 2023 (UTC)- For Proto-Germanic we have the private-use tag:
gem-x-proto
. Similarly, for Proto-Celtic, we have:cel-x-proto
:{{lang|fn=name_from_tag|cel-x-proto}}
→ Proto-Celtic
- Both are listed at Template:Lang § Private-use language tags.
- —Trappist the monk (talk) 22:59, 11 December 2023 (UTC)
- Ah so! — SMcCandlish ☏ ¢ 😼 03:43, 13 December 2023 (UTC)
- For Proto-Germanic we have the private-use tag:
- Can't this be done (using some code or other) with the private-use codes described in #New codes, above? I wouldn't mind having one for Proto-Celtic using
Common Brittonic
Given the above, I can definitely see a use at various articles (like Yan tan tethera) for cel-x-brittonic
for Common Brittonic AKA Common Brythonic, Old British, Proto-Brythonic, etc. There's no ISO base name for this (or the Insular Celtic sub-family it usually gets classified into, and for which I can't think of a private-use-code need), but the root language family is Celtic languages with a code of cel
, which we're also already using in cel-x-proto
for Proto-Celtic. — SMcCandlish ☏ ¢ 😼 19:39, 17 December 2023 (UTC)
- The subtag following the
x
singleton must be 1–8 characters;brittonic
is 9 characters. See IETF language tag § Syntax of language tags. - —Trappist the monk (talk) 20:01, 17 December 2023 (UTC)
- Derp. In that case, we could keep it quite short with
cel-x-brit
. I don't think that would be ambiguous with anything.cel-x-combrit
orcel-x-britton
could also work if we wanted to be longer. — SMcCandlish ☏ ¢ 😼 22:19, 17 December 2023 (UTC)- I chose
cel-x-combrit
because we have a Brittonic languages article which would usecel-x-brit
if it ever becomes necessary.{{lang|fn=name_from_tag|link=yes|cel-x-combrit}}
→ Common Brittonic
- —Trappist the monk (talk) 23:46, 17 December 2023 (UTC)
- Good call, and thanks for adding it. — SMcCandlish ☏ ¢ 😼 00:40, 18 December 2023 (UTC)
- I chose
- Derp. In that case, we could keep it quite short with
`yue-jyutping`, but not `yue-Latn-jyutping`
Forgive me if I missed this somewhere, but is it canonical that the code for Jyutping romanization of Cantonese should be yue-jyutping, but not yue-Latn-jyutping?
I'm comparing with Hanyu Pinyin for Standard Chinese, which is often tagged either with zh-Latn or zh-Latn-pinyin. Remsense留 00:29, 18 December 2023 (UTC)
- Tested, and
|yue-Latn-jyutping
throws "Error:{{Lang}}
: unrecognized variant:jyutping
for code-script pair:yue-latn
(help)". That's not very intuitive, since-Latn
seems to apply to anything that has been transliterated from another character set into Latin-based chars. — SMcCandlish ☏ ¢ 😼 00:49, 18 December 2023 (UTC)- Also, the
|j=
parameter of{{zh}}
emits a yue-Latn-jyutping tag, so it seems likely that one of the two templates is misbehaving. Remsense留 00:54, 18 December 2023 (UTC){{zh}}
is not rendered by Module:Lang. We have no control over that template.- —Trappist the monk (talk) 01:04, 18 December 2023 (UTC)
- Who knows? By definition, Jyutping is a romanization system so it would seem that
Latn
is superfluous. The standard is the standard. Complaints about the standard should be directed to the custodians of the standard. - —Trappist the monk (talk) 01:04, 18 December 2023 (UTC)
- Sorry if my question was unclear—I was just asking if it might be an error here or at IANA. Thank you for the reply, and thanks for all the work you do in this area of the site. :) Remsense留 01:06, 18 December 2023 (UTC)
- Also, the
- According to the IANA language-subtag-registry file:
%% Type: variant Subtag: jyutping Description: Jyutping Cantonese Romanization Added: 2010-10-23 Prefix: yue Comments: Jyutping romanization of Cantonese %%
- so Module:Lang is correct when it emits an error message complaining about
yue-Latn-jyutping
:{{lang|yue-Latn-jyutping|yue-Latn-jyutping}}
→ [yue-Latn-jyutping] Error: {{Lang}}: unrecognized variant: jyutping for code-script pair: yue-latn (help)
- I cannot explain why
zh-Latn-pinyin
is preferred overzh-pinyin
. If you think that IANA are wrong, you must take it up with them. - —Trappist the monk (talk) 01:04, 18 December 2023 (UTC)
De-italicization glitch
Shelta uses English orthography, sometimes with some Irish diacritics, and sometimes the additional character χ. The presence of that character in any {{lang|sth|...}}
string causes the entire string to be de-italicized automagically, and this is undesirable. See, e.g., Shelta#Grammar, and note how the first and last items in the table have been forced into roman mode. — SMcCandlish ☏ ¢ 😼 00:39, 18 December 2023 (UTC)
- It does that because
χ
is U+03C7 Greek small letter chi. Any non-Latn character in the text causes Module:Lang to render the text in upright font. Isχ
really the proper character or did someone simply search the characters in the char-insert tables and use whatever they found that looked more-or-less correct? - You can override the upright font:
{{lang|sth|gloχi|italic=yes}}
→ gloχi
- —Trappist the monk (talk) 01:28, 18 December 2023 (UTC)
- There is ꭕ (U+AB55 Latin small letter chi with low left serif) in Latin Extended-E:
{{lang|sth|gloꭕi}}
→ gloꭕi
- —Trappist the monk (talk) 02:05, 18 December 2023 (UTC)
- Given that all of this is based on printed books, it is likely that someone editing here just used χ as the first visual match they found for what they saw in the book, which could equally well be rendered with ꭕ, so might as well switch to that, since it's within the extended Latin character set and is not jumping ship to Greek. — SMcCandlish ☏ ¢ 😼 02:38, 18 December 2023 (UTC)
- PS: I think it happened because the IPA symbol for the sound is actually the Greek glyph χ; trying to replace that in the IPA chart with ꭕ broke the IPA template. The article has to use both in differen places, the IPA symbol for the sound in the IPA chart, and the extended Latin variant in running text for the word spellings. — SMcCandlish ☏ ¢ 😼 02:44, 18 December 2023 (UTC)
Samaritan
{{lang|smp|example}}
(the code for Samaritan Hebrew language) adds a page to Category:Articles containing Samaritan-language text but Samaritan language redirects to Samaritan Aramaic language sam
. Error (talk) 01:22, 18 January 2024 (UTC)
Fixed. The redirect was pointing to the wrong page (per https://iso639-3.sil.org/code/smp at least). – Jonesey95 (talk) 14:34, 18 January 2024 (UTC)
- Now Category:Articles containing Samaritan-language text points to a disambiguation page. It shouldn't. --Error (talk) 16:22, 19 January 2024 (UTC)
- I reverted a good-faith change to that redirect. "xxx language" redirects, where "xxx" matches the ISO name, always point to the article for that language. – Jonesey95 (talk) 17:47, 19 January 2024 (UTC)
- In Module:Language/data/iana languages, searching for "Samaritan", I find:
["sam"] = {"Samaritan Aramaic"}, ["smp"] = {"Samaritan"}
– This module contains data taken directly from a local copy of an IANA language-subtag-registry file, and is supposed to be kept in sync with that external site. - That external site apparently makes Samaritan Hebrew the primary topic for "Samaritan", by simply calling it that, rather than "Samaritan Hebrew".
- I see, Category:Articles containing Samaritan Aramaic-language text. Category:Articles containing Samaritan Hebrew-language text. Hmm.
- Samaritan Aramaic language was the primary topic for Samaritan language for 17 1⁄2 years, until Jonesey95 changed that.
- Just two articles currently link to "Samaritan language", though – Salbit and George Nicholl.
- Not sure I'm comfortable with letting a third-party website decide whether the term "Samaritan language" has a primary topic or is ambiguous, though. – wbm1058 (talk) 20:08, 19 January 2024 (UTC)
- I'm not sure why a category red link was pasted above; the relevant category is Category:Articles containing Samaritan-language text. In my experience, articles about languages are all either called "XXX language", or a redirect exists at "XXX language" pointing to the article name that the English Wikipedia has decided upon. This lang template/module set uses the ISO and IANA files to map language codes to language names; those language names are used for the relevant categories. In the case that the OP posted about, the redirect was pointing to the wrong place, so I fixed it. Since, as you say, there are minimal links to both pages, it should be fine to have {{for}} links at the top of each of the language pages; I have added those. [Edited to add: Since we call it "Samaritan Hebrew" here, as does Ethnologue, a reputable language source, maybe the lang templates should override the default "Samaritan" with "Samaritan Hebrew", which would free up "Samaritan language" to be a disambuiguation page. I don't know how to do that override.] – Jonesey95 (talk) 22:50, 19 January 2024 (UTC)
- Easily enough done if and when the editors here can figure out, and clearly state, what it is that they want. Thus far, that has not happened. This discussion was originally at Module talk:Language § Samaritan. I'm not inclined to change anything until there is at least a minimal consensus, clearly stated, to override ISO 639-3/IANA or repoint the redirect.
- —Trappist the monk (talk) 23:10, 19 January 2024 (UTC)
- OK, so ["smp"] = "Samaritan Hebrew", -- to match en.wiki article title: Samaritan Hebrew.
- Now, Category:Articles containing Samaritan-language text says: Error: Samaritan is not a valid ISO 639 or IETF language name. Please see Template talk:Lang for assistance.
- Go figure. Have you figured out what we want yet? wbm1058 (talk) 02:53, 20 January 2024 (UTC)
- That follows logically from the diff. I guess that's what we want then. The next step was to create Category:Articles containing Samaritan Hebrew-language text. I have restored and spruced up the disambiguation page at Samaritan language and marked the old category for deletion. I think this may be resolved. – Jonesey95 (talk) 05:21, 20 January 2024 (UTC)
- Very good, thanks. You figured it out for me. Category:Articles containing Samaritan-language text history-merged to Category:Articles containing Samaritan Hebrew-language text and deleted. – wbm1058 (talk) 14:12, 20 January 2024 (UTC)
- That follows logically from the diff. I guess that's what we want then. The next step was to create Category:Articles containing Samaritan Hebrew-language text. I have restored and spruced up the disambiguation page at Samaritan language and marked the old category for deletion. I think this may be resolved. – Jonesey95 (talk) 05:21, 20 January 2024 (UTC)
- I'm not sure why a category red link was pasted above; the relevant category is Category:Articles containing Samaritan-language text. In my experience, articles about languages are all either called "XXX language", or a redirect exists at "XXX language" pointing to the article name that the English Wikipedia has decided upon. This lang template/module set uses the ISO and IANA files to map language codes to language names; those language names are used for the relevant categories. In the case that the OP posted about, the redirect was pointing to the wrong place, so I fixed it. Since, as you say, there are minimal links to both pages, it should be fine to have {{for}} links at the top of each of the language pages; I have added those. [Edited to add: Since we call it "Samaritan Hebrew" here, as does Ethnologue, a reputable language source, maybe the lang templates should override the default "Samaritan" with "Samaritan Hebrew", which would free up "Samaritan language" to be a disambuiguation page. I don't know how to do that override.] – Jonesey95 (talk) 22:50, 19 January 2024 (UTC)
- In Module:Language/data/iana languages, searching for "Samaritan", I find:
- I reverted a good-faith change to that redirect. "xxx language" redirects, where "xxx" matches the ISO name, always point to the article for that language. – Jonesey95 (talk) 17:47, 19 January 2024 (UTC)
- Now Category:Articles containing Samaritan-language text points to a disambiguation page. It shouldn't. --Error (talk) 16:22, 19 January 2024 (UTC)
Lang-ktz
returns the wrong spelling, even though the name is spelled correctly [Juǀʼhoan] at Module:Language/data/ISO 639-3. Where do I go to fix? — kwami (talk) 00:34, 21 January 2024 (UTC)
- Where are you seeing a misspelling? If I write:
<code>[{{lang|fn=name_from_tag|ktz}}]</code>
→[Juǀʼhoan]
- and without the
<code>...</code>
tags:[{{lang|fn=name_from_tag|ktz}}]
→ [Juǀʼhoan]
- Where are you seeing a different spelling?
- —Trappist the monk (talk) 00:50, 21 January 2024 (UTC)
- In both. (A quick test on my system is to double click on the result. Only part of the name highlights.) — kwami (talk) 00:54, 21 January 2024 (UTC)
- Don't know that that is much of a test. If I double click your example and both of my examples, all eight characters are highlighted in each case.
- If I examine all three examples at https://r12a.github.io/uniview/, the only difference between your example and the output from Module:Lang is the apostrophe. You use U+02BC: MODIFIER LETTER APOSTROPHE and Module:Lang uses U+0027: APOSTROPHE which is in keeping with en.wiki's preference (MOS:CURLY). Is that where the highlighting stops?
- —Trappist the monk (talk) 01:15, 21 January 2024 (UTC)
- If I double-click on the word "Don't" in Trappist's response above, only "Don" or "t" is highlighted. That does not indicate an error. – Jonesey95 (talk) 14:34, 21 January 2024 (UTC)
- You know? I was just going to ask about that ...
- —Trappist the monk (talk) 15:17, 21 January 2024 (UTC)
- Might be OS or some other thing dependent, but if I double click "don't" or "[Juǀ'hoan]", the whole text is highlighted for me. Gonnym (talk) 16:35, 21 January 2024 (UTC)
- Yes, it's OS or something dependent. For me, it's a convenient test to check if a word contains punctuation substitutes for letters. E.g. Juǀʼhoan with a click letter highlights as a word, but Ju|ʼhoan with a punctuation mark substituted does not. — kwami (talk) 19:10, 21 January 2024 (UTC)
- Wait, what? Earlier, you wrote:
Only part of the name highlights.
Now you write:Juǀʼhoan with a click letter highlights as a word
. Is this not contradictory? None of the example language names, except the latter one in your most recent post, use a pipe character (U+007C: Vertical line). What am I missing? Is there still awrong spelling
issue here? - —Trappist the monk (talk) 19:27, 21 January 2024 (UTC)
- Only part of the name highlighted because there was a punctuation substitution for proper orthography. That happens with either the click letter or the modifier apostrophe. For the whole name to highlight, all of the characters need to be letters. — kwami (talk) 19:35, 21 January 2024 (UTC)
- So what you are saying is that your OS objects to U+0027: APOSTROPHE (a punctuation character)? And you didn't answer my other question:
Is there still a 'wrong spelling' issue here?
- —Trappist the monk (talk) 19:49, 21 January 2024 (UTC)
- It doesn't object to it, it just recognizes that it's a punctuation mark rather than a letter. Quite convenient to test whether someone used a curly quotation mark instead of IPA for ejective consonants, for example.
- Yes, the spelling issue is that we use a punctuation mark for a letter. If there's consensus that we should do that, then fine; I thought it was an error. — kwami (talk) 19:54, 21 January 2024 (UTC)
- Ok thanks. Nothing to do here.
- —Trappist the monk (talk) 20:05, 21 January 2024 (UTC)
- Kwami, if that character should be used, you should bring it up at Wikipedia:Manual of Style. MOS:APOSTROPHE allows the following:
Letters resembling apostrophes, such as the ʻokina ( ʻ – markup: ʻ), saltillo ( ꞌ – markup: ꞌ), Hebrew ayin ( ʽ – markup: ʽ) and Arabic hamza ( ʼ – markup:ʼ), should be represented by those templates or by their Unicode values.
Gonnym (talk) 20:53, 21 January 2024 (UTC)- That's exactly the issue.
- Why would I bring it up at the MOS? That section is pretty clear already: letters should be encoded as letters. They even provide for the {hamza} template to be used for ejective consonants, which is essentially what this is. — kwami (talk) 20:55, 21 January 2024 (UTC)
- If the character you want to add (to me it looks like a curly apostrophes so I don't know which one it is) an ʻokina, saltillo, ayin or hamza? If it isn't one of those, it isn't
essentially what this is
, which is why I said that you should bring it up at the MoS page. Gonnym (talk) 21:02, 21 January 2024 (UTC)- It's the hamza. — kwami (talk) 21:15, 21 January 2024 (UTC)
- Also, they say "such as". They're not going to list every single character. The point is that the MOS stuff about apostrophes (no curly apostrophes etc.) applies to punctuation. It doesn't require us to distort a language's orthography.
- (When I said "pretty much", I meant it's arguable whether it's really an ejective in this case -- a few KS languages make a distinction between glottalized and ejective clicks -- but it's written as if it were an ejective, just as glottalized letters are in many alphabets.) — kwami (talk) 21:17, 21 January 2024 (UTC)
- So we're not done? Do we undo the override or keep it as it is? As far as I can tell, the override (imported from the now deleted Module:Language/data/wp_languages) has been in place for nearly a decade (since 15 April 2014). The associated article, Juǀʼhoan language, uses the curly apostrophe.
- —Trappist the monk (talk) 21:39, 21 January 2024 (UTC)
- I don't know what the consensus is here. If it's to follow the MOS, then yes, we should change it to the modifier apostrophe (the letter, not the quotation mark). If it's to use ASCII substitutions, then it's fine as is.
- Personally, I think that if we use the proper Unicode characters for languages with some political clout in the US, like Hawaiian where people insist on a proper okina letter, then we should do the same for languages that don't have such clout. — kwami (talk) 23:31, 21 January 2024 (UTC)
- I don't have a problem with that. Given my druthers, en.wiki would follow ISO 639 naming conventions so that overrides are unnecessary. I'm not going to hold my breath for that. So, I will undo the override so that
ktz
uses the name as given in the IANA language-subtag-registry file: Juǀʼhoan which uses U+02BC: MODIFIER LETTER APOSTROPHE. - —Trappist the monk (talk) 23:47, 21 January 2024 (UTC)
- And done:
<code>{{lang|fn=name_from_tag|ktz}}</code>
→Juǀʼhoan
- —Trappist the monk (talk) 23:50, 21 January 2024 (UTC)
- Thanks!
- BTW, a couple years ago ISO was going through all their language names to treat such ASCII/Unicode issues consistently after making a few sporadic fixes. (That is, fixes for languages that had someone to speak up and make a formal request.) I don't know if it ever got anywhere. — kwami (talk) 23:51, 21 January 2024 (UTC)
- And done:
- I don't have a problem with that. Given my druthers, en.wiki would follow ISO 639 naming conventions so that overrides are unnecessary. I'm not going to hold my breath for that. So, I will undo the override so that
- If the character you want to add (to me it looks like a curly apostrophes so I don't know which one it is) an ʻokina, saltillo, ayin or hamza? If it isn't one of those, it isn't
- So what you are saying is that your OS objects to U+0027: APOSTROPHE (a punctuation character)? And you didn't answer my other question:
- Only part of the name highlighted because there was a punctuation substitution for proper orthography. That happens with either the click letter or the modifier apostrophe. For the whole name to highlight, all of the characters need to be letters. — kwami (talk) 19:35, 21 January 2024 (UTC)
- Wait, what? Earlier, you wrote:
- Yes, it's OS or something dependent. For me, it's a convenient test to check if a word contains punctuation substitutes for letters. E.g. Juǀʼhoan with a click letter highlights as a word, but Ju|ʼhoan with a punctuation mark substituted does not. — kwami (talk) 19:10, 21 January 2024 (UTC)
- Might be OS or some other thing dependent, but if I double click "don't" or "[Juǀ'hoan]", the whole text is highlighted for me. Gonnym (talk) 16:35, 21 January 2024 (UTC)
- If I double-click on the word "Don't" in Trappist's response above, only "Don" or "t" is highlighted. That does not indicate an error. – Jonesey95 (talk) 14:34, 21 January 2024 (UTC)
- In both. (A quick test on my system is to double click on the result. Only part of the name highlights.) — kwami (talk) 00:54, 21 January 2024 (UTC)
Changes
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)
- 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}}
- at this edit, you added the template
- 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)
- Thanks very much for looking into this and for fixing it. Stevie fae Scotland (talk) 09:00, 12 April 2024 (UTC)
Code for Anatolian languages
@Trappist the monk: I need a private-use language tag for Anatolian languages. Antiquistik (talk) 20:32, 6 April 2024 (UTC)
- Propose one. You know the rules for making a private-use tag.
- —Trappist the monk (talk) 21:45, 6 April 2024 (UTC)
- @Trappist the monk: Does
anat
work? Or is it already assigned? Antiquistik (talk) 21:51, 6 April 2024 (UTC)- and the rest of it?
- —Trappist the monk (talk) 22:01, 6 April 2024 (UTC)
- @Trappist the monk: I have no idea. I will need your help for that. Antiquistik (talk) 00:00, 7 April 2024 (UTC)
- 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)
- @Trappist the monk: Would
ine-x-anatolia
work? Antiquistik (talk) 17:59, 15 April 2024 (UTC){{lang|ine-x-anatolia|text}}
→ text- —Trappist the monk (talk) 18:20, 15 April 2024 (UTC)
- @Trappist the monk: Thanks! Antiquistik (talk) 19:00, 15 April 2024 (UTC)
- @Trappist the monk: Would
- @Trappist the monk: I have no idea. I will need your help for that. Antiquistik (talk) 00:00, 7 April 2024 (UTC)
- @Trappist the monk: Does