Template talk:Lang/Archive 11
Is the template needed for obscure languages?Sometimes I come across an article about an obscure language that has a big maintenance template at the top requesting that non-English text in the article be put into {{lang}}. Now, is this really necessary? I know that in principle it's good to have rigorous semantic markup, but I'm struggling to see the practical benefits here. Template:Lang#Rationale lists a number of reasons why adding the template is a good idea, but they mostly seem to presuppose we're talking about a language with well-developed computing resources. Are there any screen readers for the Tape language of Vanuatu (which is spoken by 15 people)? Are there spell-checkers for the Tsez language (spoken in a few villages and never written)? Will readers of Karu language have any genuine difficulty figuring out that the unpronounceable strings in italics quoted here and there are in fact words in Karu? And how does that weigh against the costs of using the template? Implementing it takes editorial labour, while having it there clutters the wiki source, and adds hurdles in the way of those using the Visual editor. What benefits are there to counterbalance those costs? – Uanfala (talk) 21:11, 31 March 2021 (UTC)
WatchlistHello everybody, I have a question. I know that a registred user can receive alerts whenever a particular page is modified, even template pages like this, just by adding that page to his/her watchlist. Talking about templates, is it also possible to receive alerts whevever a particular template, included inside a page, is modified? To make an example, if I want to be notified when the template "Lang-el" included in any page is edited what shall I do? Is this possible or, to do such a thing, must a user add to his/her watchlist every page which includes that template? Contojorges (talk) 20:15, 5 April 2021 (UTC)
Nepal Bhasa to NewarThe categories for Nepal Bhasa were accepted for speedy renaming to Newar, see CFDS (permalink). Category:Articles containing Classical Newar-language text was apparently incorrect so I moved this again to Category:Articles containing Classical Newari-language text per Classical Newari. I tried to update Module:Lang/data accordingly, but this has not gone smoothly, and Category:Articles containing Nepal Bhasa-language text is currently populated again – perhaps temporarily. Category:Articles containing Newar-language text also shows an error message – ah, it's gone now. @Trappist the monk: or others, please check again. – Fayenatic London 14:18, 1 May 2021 (UTC)
sq-fonipaIn Himni_i_Flamurit#Lyrics_and_translation I tried to use {{lang|sq-fonipa}} for the IPA version of the anthem, but the template does not recognize the variant fonipa for Albanian: [rɛθ̟ fla.mu.ɾit tə pəɾ.baʃ.ku.aɾ] I also tried to tag it as just {{lang|sq}}: [[rɛθ̟ fla.mu.ɾit tə pəɾ.baʃ.ku.aɾ] It seems that <poem>, lang and | interact uglyly. --Error (talk) 20:45, 9 May 2021 (UTC)
[rɛθ̟ fla.mu.ɾit tə pəɾ.baʃ.ku.aɾ]
Notes Changing bold text of banner message?Sometimes I come across this template and the amount of bold text is pretty jarring. Thoughts on making it less cluttering? Current:
Proposed:
Right now it has more bold than the needs references template, which in my opinion is more important to most readers. Also not sure why phonetic is spelled "phoenetic." Cheers, Fredlesaltique (talk) 04:28, 13 May 2021 (UTC)
u-sd-I was trying to tag text in Murcian Spanish with {{lang|es-u-sd-esmc}} like [la casa] Error: {{Lang}}: unrecognized language tag: es-u-sd-esmc (help) but it fails. Since the Murcia Region and the Murcia (province) are coterminous, I tried {{lang|es-u-sd-esmu}}: [la casa] Error: {{Lang}}: unrecognized language tag: es-u-sd-esmu (help), but it also fails. Does Lang not support the -u-sd extension of IETF language tags? --Error (talk) 22:43, 22 May 2021 (UTC) May not work with referencesThis template does not work reliably for references formatted with the {{cite}} templates. I've noticed the problem when an URL is provided and the cite template is embedded in a footnote. For example,[1]
(That displays just fine here, but not in article space.) — kwami (talk) 08:37, 29 May 2021 (UTC)
Thanks. Will that enable screen readers to read them properly, which seems to be the point of this template? — kwami (talk) 18:47, 29 May 2021 (UTC)
Change to Latinization display?Was there recently a change to -Latn display, or am I misremembering? I noticed this at Kaguya in this revision ([1]; notice the words "Kaguya-hime"), and at Chonmage in the current revision ([2], visible for both ja-Latn throughout and zh-Latn in the See also). I think that the transl template is the more semantically correct one and its the one that I normally use, but I just wanted to make sure about that, since this Latinized display caught my eye as being incorrect. Pinging User:Ineffablebookkeeper, who I often see adding such tags, and who added the tags in the Chonmage case. — Goszei (talk) 04:37, 7 June 2021 (UTC)
Problems with bo-Latn and bo-Latn-pinyin
The Romanized text appears too small on my Pale Moon (browser). --Error (talk) 00:46, 16 April 2021 (UTC)
CQ for Sark is not recognizedI wanted to tag Sercquiais but it does not recognize
FraternitiesFor Greek Letters in articles about Fraternities and Sororities be enclosed in the template?Naraht (talk) 12:12, 30 June 2021 (UTC)
Display of lang-encoded text in different fontsI've been attempting to get more editors than just me adding language tags to the articles they edit recently - either by adding Now, I know why this happens - the markup specifies the text is in a certain language and writing system, and it leaves it up to the browser to decide exactly what to display this in. This means that even someone running the crustiest version of Internet Explorer can display the same text as the shiniest version of Firefox. (I think.) However, what keeps coming up is that it's unsightly. The fonts used to display some text stick out from the font used for the rest of article. Editors remark that on some browsers or for some languages, text that's been encoded in language tags just looks ugly - it upsets the flow of the article, stands out like a pork pie at a Jewish wedding - and for some, is a reason not to use language tags, as the "net benefit" (as described to me by one editor) just isn't convincing enough, or large enough, to justify using them. I know that use of language tags is mandated through MOS:ACCESS. I know it's entirely justified, and that for me at least, fonts are such a bottom-of-the-pile concern that a minor trip hazard in an article's display is worth the basic accessibility of an article someone with a screenreader can actually read and interact with. But I have to ask - is there anything that can be done for this, at all? I want to keep on encouraging editors to use language tags, but I need to know if there's a workaround, or something that can be done, so that when this issue comes up again - and it invariably will - I have some kind of answer to give them. Thanks! --Ineffablebookkeeper (talk) 11:45, 2 February 2021 (UTC)
bug in Rapa Nui languageHi. {{tl:lang|rap}} shrinks the font rather than just italicizing it. Could someone fix, please? — kwami (talk) 02:31, 17 July 2021 (UTC)
I'm using FF 90.0 for Linux Mint. On my display, the Rapa Nui is smaller than the Spanish: slightly smaller than the html subscript in Spanish Rongorongo. Also, the inclination and letter shapes are very slightly different, as if the Rapa Nui were faux (html) italics imposed on the roman typeface rather than the italic typeface of the Spanish. (Looks like the same font family, though.) I've seen this before. I don't remember which language, but Rongorongo formatted as Hawaiian looks the same as the Spanish, while Rongorongo formatted as Nahuatl looks like the Rapa Nui. Swahili looks good (like Spanish), Hadza looks bad (like Rapa Nui). Could this be a difference between languages with dedicated formatting, and the {{lang}} default used for unsupported languages? I'm not recognizing anything in my js or css that would make a difference. I have Andika set for Unicode, but I think I'm seeing Andika for both Spanish and Rapa Nui, so that wouldn't explain the difference in size. — kwami (talk) 04:06, 17 July 2021 (UTC)
Gascon in Mistral spellingI tried to tag text in Gascon language with Mistralian orthography (there is an example in the caption for the pic in Gascon language#Examples) but it doesn't work:
However
work. Shouldn't the combination of dialect and spelling work? This applies to all plausible combinations of Occitan dialect and spelling subtags. --Error (talk) 00:55, 16 April 2021 (UTC)
lang-sh two parameters and "romanized"I posted about a problem at Template talk:Lang-sh#Two parameters and "romanized" - can someone here help? --Joy [shallot] (talk) 09:42, 31 July 2021 (UTC) Problem with language userboxHello, I'm not sure where to go for help with this but an editor has a language userbox that keeps placing them in a redirect category, Category:User zh-Hans, instead of the regular category, Category:User zh-hans. The user page is User:KisaragiAyami and, unbeknownst to them, I have messed around with the code but didn't want to remove the language element completely but I was unsuccessful. I've looked at the relevant template pages but didn't find any information about this specific issue and miscategorizations. If anyone else can fix this, it would be greatly appreciated. Thanks! Liz Read! Talk! 21:17, 3 August 2021 (UTC)
Circa in historical languages should be rendered c. instead of ca.Circa in historical languages should be rendered c. instead of ca. per MOS:CIRCA. See e.g. the tooltip in: Some text in Middle French. – Finnusertop (talk ⋅ contribs) 10:28, 7 August 2021 (UTC)
lang-jaxI tried to create Template:lang-jax copying the code from Template:lang-id with jax as the code but it shows an error:
Can the template be created? --Error (talk) 18:04, 8 August 2021 (UTC)
Why is this template suddenly required?Why are the clean-up banners for this template suddenly popping up in articles demanding that this template be used? Yet another example of WP:Overtagging putting up huge disruptive (for readers) banners for what should be background clean-up work, but that's another matter. The rationale isn't enough for this to become compulsory. Especially for languages which use latin script, and words which by context are already pretty clear on which language they are from (including their meaning). For the vast majority of foreign text, you don't need web browser support. Neither are there special screen readers that can read different languages out loud correctly for most languages. That only exists for the major languages. The sheer amount of effort needed to implement this is insane in articles which use multiple non-English words (like most of the articles I work on). You have to look up each individual language tag, which can't be found on one page either. You can't search and replace, because you might hit the urls and the references if you do. So you manually have to type the template out each time. There are no provisions for shared terms either. You have to pick one specific language code, even when the same term is used for several closely-related languages that have the same name (like Kalinga language for example). At the very least, can't this be integrated into the edit box? With a search function for ISO codes?-- OBSIDIAN†SOUL 13:05, 10 August 2021 (UTC)
Missing language (Tagish, Lang-tgx)The ISO 639-3 code for the Tagish language (tgx) is not recognized as a valid template OlliverWithDoubleL (talk) 22:32, 17 August 2021 (UTC)
Unmatched quote character@Trappist the monk: Kan Qingzi is displaying an unmatched quote mark in the hatnote. Is this perhaps because at line 1184 of Module:Lang, there is \'' rather than \'\' ? – Fayenatic London 10:34, 9 September 2021 (UTC)
|
![]() | This edit request to Template:Lang has been answered. Set the |answered= parameter to no to reactivate your request. |
Please change Eskimo-Aleut languages to Eskimo–Aleut languages (change hyphen to en dash), for lang code "esx", somewhere in this template or its data; I don't see exactly where that would be. Dicklyon (talk) 18:00, 21 November 2021 (UTC)
- There are some 470ish language names in Module:Language/data/iana languages that use hyphens; none use an endash. Are all of those 470ish language names subject to this same request? If they are, and we know that there will be no broken links, we could force convert hyphenated language names to endash separated names. But, that brings with it the possibility that some hyphenated names should properly be hyphenated so forced conversion is probably a bad idea. If not, then we might add the endash form to Module:Lang/data.
- If this issue is raised because of one of the two articles that use
{{lang-esx}}
, then perhaps this:- Eskimo–Aleut languages: text ←
{{langx|esx|text|label=[[Eskimo–Aleut languages]]}}
- Eskimo–Aleut languages: text ←
- —Trappist the monk (talk) 18:42, 21 November 2021 (UTC)
- I went ahead and did that manual fix at the two articles I had found, which you also noticed. But we might as well keep working toward the better fix. Thanks. Dicklyon (talk) 03:44, 22 November 2021 (UTC)
- I would think not all of them. If you can get me a list, I'll check. The ones where the hyphen form redirects to the en dash form probably should be auto-fixed. Some others use a hyphen, e.g. when the involve a "combining form" instead of parallel terms. The Eskimo–Aleut languages article was moved to the dashed from 10 years ago by Kwamikagami. It looks to me like he did the same, 10 years ago, for pretty much everything in Category:Language families. Individual languages I would guess would use dashes less often, but haven't checked. Dicklyon (talk) 22:45, 21 November 2021 (UTC)
- Put this in a sandbox page to get the list of language names that use hyphens (omits hyphens associated with digits)
{{#invoke:Sandbox/trappist_the_monk/hyphenated_language_names|list}}
- —Trappist the monk (talk) 23:31, 21 November 2021 (UTC)
- Thanks; got the list at User:Dicklyon/sandbox/dash. Those with Afro- and Austro- combining forms shouldn't go to en dash. But Atlantic-Congo languages was moved to the en dash 10 years ago and should be fixed here. I'll do some more looking... Dicklyon (talk) 03:17, 22 November 2021 (UTC)
- Put this in a sandbox page to get the list of language names that use hyphens (omits hyphens associated with digits)
- I was thinking that "Chukatko" might be a combining form; it's never seen alone, and often set with hyphen. But then this book uses an en dash in "Chukotko–Kamchatkan family", so now I'm not sure. Haven't looked at others. Someone more into languages should say whether such things are parallel terms or not (i.e. would Kamchatkan–Chukotko make just as much sense?). Dicklyon (talk) 22:54, 21 November 2021 (UTC)
- @ValtteriLahti12: Based on Chukotko-Kamchatkan–Amuric languages, it looks like you'll know something about this. Dicklyon (talk) 03:41, 22 November 2021 (UTC)
- @Kwamikagami: I see you're still at it here, too. I mentioned your dash fixes of a decade ago. They're not fully completed. Dicklyon (talk) 03:43, 22 November 2021 (UTC)
- I was thinking that "Chukatko" might be a combining form; it's never seen alone, and often set with hyphen. But then this book uses an en dash in "Chukotko–Kamchatkan family", so now I'm not sure. Haven't looked at others. Someone more into languages should say whether such things are parallel terms or not (i.e. would Kamchatkan–Chukotko make just as much sense?). Dicklyon (talk) 22:54, 21 November 2021 (UTC)
This one looks like a plain bug: Finland-Swedish Sign Language language should be Finland-Swedish Sign Language. Dicklyon (talk) 03:23, 22 November 2021 (UTC)
- Fixed that. I have also added an (expensive) check to look for language names that redirect to endash-separated targets.
- —Trappist the monk (talk) 13:05, 22 November 2021 (UTC)
I"ve always assumed "Chukotko-" was the combining form of Chukotka, equivalent to "Nilo-" or "Americo-". I would assume that the use of the en dash in the book you found is a copy-edit error, perhaps an over-generalization. — kwami (talk) 04:14, 22 November 2021 (UTC)
- But you agree, I assume, that all those with hyphens redirecting to dash fixes you made a decade ago should be fixed in this template. Yes? Dicklyon (talk) 04:42, 22 November 2021 (UTC)
OK, I would suggest changing the following:
- Atlantic-Congo languages → Atlantic–Congo languages
- Bukar-Sadung Bidayuh language → Bukar–Sadong language
- Eskimo-Aleut languages → Eskimo–Aleut languages
- Havasupai-Walapai-Yavapai language → Havasupai–Hualapai language
- Hmong-Mien languages → Hmong–Mien languages
- Niger-Kordofanian languages → Niger–Congo languages
- Omaha-Ponca language → Omaha–Ponca language
- Trans-New Guinea languages → Trans–New Guinea languages
- Mon-Khmer languages → Mon–Khmer languages
Dicklyon (talk) 21:44, 24 November 2021 (UTC)
@Trappist the monk: are you willing/able to do this for the above now? Dicklyon (talk) 19:45, 30 November 2021 (UTC)
- cf:
- Atlantic-Congo languages → Atlantic–Congo languages
- Bukar-Sadung Bidayuh → Bukar–Sadong
- Eskimo-Aleut languages → Eskimo–Aleut languages
- Havasupai-Walapai-Yavapai → Havasupai–Hualapai
- Hmong-Mien languages → Hmong–Mien languages
- Niger-Kordofanian languages → Niger–Congo languages
- Omaha-Ponca → Omaha–Ponca
- Trans-New Guinea languages → Trans–New Guinea languages
- Mon-Khmer languages → Mon–Khmer languages
- —Trappist the monk (talk) 20:33, 30 November 2021 (UTC)
- Yes, it looks like you fixed it. Thanks. Dicklyon (talk) 04:13, 8 December 2021 (UTC)
languageicon class
I'm trying to find where the definition of the class "languageicon" is found, as this module and template don't use templatestyles and it isn't found at MediaWiki:Common.css. Also, since these don't actually show an icon, can we rename the class to remove the word "icon" from it? Gonnym (talk) 12:01, 27 December 2021 (UTC)
class="languageicon"
is not defined anywhere. It was originally included in{{link language}}
which was used by all of the{{xx icon}}
templates before the consolidation into{{in lang}}
. Template:Link lang/doc had this:- Logged in users can change the appearance of the template's output using CSS with the
languageicon
class. For example, edit Special:MyPage/common.css and addspan.languageicon { font-weight: bold; }
. That would result in{{link language|fr}}
being displayed as {{link language|fr}} instead of {{link language|fr}}.
- Logged in users can change the appearance of the template's output using CSS with the
- Also appears in
{{native name}}
but is not documented. - Apparently only used by two editors.
- —Trappist the monk (talk)
12:41, 27 December 2021 (UTC)12:47, 27 December 2021 (UTC) (add)12:51, 27 December 2021 (UTC) (add more)- I think the very low usage means that the name can be changed without any real issues. Gonnym (talk) 13:32, 27 December 2021 (UTC)
Incorrect usage of symbols
I noticed a signature that is misusing this template for {{lang|ko|☆}}
. Can a tracking category be added if the characters are not a word characters? Gonnym (talk) 14:33, 22 December 2021 (UTC)
- sumbols → symbols
- meh. That particular character is U+2606 WHITE STAR which is part of U+2600–U+26FF Miscellaneous Symbols. So, constrained to that group of contiguous symbols, probably not difficult but... If we start complaining about these symbols then ought we not also complain about emoji? The problem with emoji is that they are not in a single contiguous group of code points; and there are a lot of them.
- Yeah,
{{lang|ko|☆}}
is probably a misuse but is also more-or-less harmless in that the browser renders it using a Korean-script font instead of a Latn-script font. No idea how screen-readers pronounce that character in either English or Korean. - —Trappist the monk (talk) 15:11, 22 December 2021 (UTC)
- At least ☆/★, =/= etc. are sometimes used in proper names in some languages.
- (E.g. 魔法少女まどか☆マギカ, more examples)
- Arfrever (talk) 10:20, 26 December 2021 (UTC)
- See how correct usage is handled at Tom Cat (band). Gonnym (talk) 15:30, 26 December 2021 (UTC)
- That page actually contains e.g.
*''TOM{{lang|ja|★}}CAT'' - June 21, 1985
. I thought that you were objecting to this usage. - Japanese_punctuation#Interpunct says:
in creative writing, especially manga and light novels when transcribing proper nouns, there's a fad of replacing the interpunct with an equal sign, a white star or any other "fitting" symbol
- Returning to TOM★CAT example, there is difference in rendering as seen in these examples:
TOM★CAT
: TOM★CATTOM{{lang|en|★}}CAT
: TOM★CATTOM{{lang|ja|★}}CAT
: TOM★CAT''TOM★CAT''
: TOM★CAT''TOM{{lang|en|★}}CAT''
: TOM★CAT''TOM{{lang|ja|★}}CAT''
: TOM★CAT''{{lang|en|TOM★CAT}}''
: TOM★CAT''{{lang|ja|TOM★CAT}}''
: TOM★CAT
- Other comparisons:
{{lang|en|☆}}
: ☆{{lang|ja|☆}}
: ☆{{lang|ko|☆}}
: ☆''{{lang|en|☆}}''
: ☆''{{lang|ja|☆}}''
: ☆''{{lang|ko|☆}}''
: ☆{{lang|en|♪}}
: ♪{{lang|ja|♪}}
: ♪{{lang|ko|♪}}
: ♪''{{lang|en|♪}}''
: ♪''{{lang|ja|♪}}''
: ♪''{{lang|ko|♪}}''
: ♪
- Japanese/Korean stars and musical notes are bigger than English ones. When italic type is used, Japanese/Korean stars and musical notes are slanted, but English ones are not.
- This strongly says to me that characters like stars and musical notes should be allowed with
{{lang}}
.
- That page actually contains e.g.
- Arfrever (talk) 17:34, 27 December 2021 (UTC)
- See how correct usage is handled at Tom Cat (band). Gonnym (talk) 15:30, 26 December 2021 (UTC)
Lang and title param
I noticed that on the W3C website, it is explained here that the lang
attribute not only applies to the content of an element, but also its other attributes such as title
. So in <i lang="de" title="German-language text">Beispiel</i>
(which is currently the result of {{lang|de|Beispiel}}
), the lang="de"
is also applied to the "German-language text" title, even though that's obviously in English. The W3C website recomments putting the lang
attribute on a <span>
tag inside the element that contains the title
attribute. Is this something that would be worth fixing? ―Jochem van Hees (talk) 22:52, 10 January 2022 (UTC)
- Yep, thanks for the notification. I'll think about how that should be accomplished.
- —Trappist the monk (talk) 23:24, 10 January 2022 (UTC)
Pronunciation
Can we add parameter for IPA pronunciation? It is very often used along this template, and it would be easier to just have it in it, than using another IPA template. Piotr Bart (talk) 15:12, 20 January 2022 (UTC)
Add bdi tag
![]() | This edit request to Module:Lang has been answered. Set the |answered= parameter to no to reactivate your request. |
Please edit this module similar to fa:Special:Diff/33792781 so that the text is wrapped in <bdi>
tags. If the text contains spaces and its directionality is opposite that of the wiki language (in case of enwiki, if text is rtl) browsers may not render it properly without a bdi tag. Please {{ping}} me if you have any questions. huji—TALK 01:10, 24 December 2021 (UTC)
Done. P.I. Ellsworth - ed. put'r there 07:05, 24 December 2021 (UTC)
- @Huji:, can you have a look at Template:Interlanguage link (also known as, {{ill}}) and see if that template would benefit from similar treatment of the foreign element, at least for cases when the language parameter indicates that the third positional parameter (foreign language article title) is in an RTL language? I'm thinking of cases where a Hebrew title, let's say, which would normally be rtl, could be ltr for some titles imported from English or other ltr languages, such as "IBM" in Hebrew Wikipedia. Or do you think this is too much of an edge case to worry about? Adding Paine Ellsworth. Mathglot (talk) 09:24, 24 December 2021 (UTC)
- I'm not convinced that this is a proper solution. Slapping
<bdi>...</bdi>
tags around all<other-language-text>
regardless of its directionality and the directionality of the surrounding text is wrong for a couple of reasons. When the directionality of the<other-language-text>
is the same as the directionality of the local wiki, there is no need to isolate<other-language-text>
inside<bdi>...</bdi>
tags.<bdi>...</bdi>
tags are appropriate when we don't know the directionality of<other-language-text>
. But we do know the directionality of<other-language-text>
so, here at en.wiki, we set the appropriate attributes in the wrapping<span>...</span>
. - Not really surprising that what works at en.wiki does not work at fa.wiki. Module:Lang was not written with internationalization in mind. I suspect that the real issue with Module:Lang at fa.wiki is a matter of inadequate attention to i18n that just happens to get fixed by slapping in the
<bdi>...</bdi>
tag patch. - There has been no evidence here that Module:Lang does not work properly at en.wiki so I am going to revert this change. We should discuss i18n and make a plan to address it. @Huji, for the duration of the i18n discussion, please watchlist this page.
- —Trappist the monk (talk) 15:12, 24 December 2021 (UTC)
- To editor Trappist the monk: forgive my overly-bold edit – been kickin' meself for not checking with you first. Happy holidays to you and yours! P.I. Ellsworth - ed. put'r there 15:40, 24 December 2021 (UTC)
- @Paine Ellsworth: With all due respect, while I agree that the "perfect" solution here is to make Module:Lang compatible with i18n, I think the bdi tag solution is good-enough (having bdi tags around text that is in the same direction does not hurt anything) and you are letting perfect be the enemy of the good here. Bur your mileage may vary.
- For all I know, enwiki templates and modules rarely support i18n and specifically are not rtl-friendly, and many other wikis copy them directly (and update their local copy periodically by copying the latest version off enwiki) so lots of time is wasted downstream in addressing issues like these. We spent a good 100+ hours to get CS1 module series (for citations) work properly on fawiki and I'm 100% confident that enwiki community will never care to backport our changes into the enwiki version to make it i18n-able. Incentives are not aligned here (those who cause the problem are not those who pay the price) so there is no surprise in lack of i18n in enwiki templates and modules.
- I added this page to my watchlist. Look forward to responding here in 2-3 years with a "told you so", as I am fairly confident this module won't get i18n'ed either. huji—TALK 17:25, 24 December 2021 (UTC)
- I suspect that you are targeting your anger at the wrong editor. I am the editor who suggested that the fa.wiki 'fix' is improper. For the nonce, I think that a better solution is to:
- at Module:Lang line 28, add this:
local this_wiki_lang_dir = mw.language.getContentLanguage():getDir(); -- get this wiki's language direction
- replace lines 515–517 with:
if (rtl or unicode.is_rtl(text)) and ('ltr' == this_wiki_lang_dir) then -- text is right-to-left on a left-to-right wiki table.insert (html, ' dir="rtl"'); -- add direction attribute for right-to-left languages elseif not (rtl or unicode.is_rtl(text)) and ('rtl' == this_wiki_lang_dir) then -- text is left-to-right on a right-to-left wiki table.insert (html, ' dir="ltr"'); -- add direction attribute for left-to-right languages end
- delete lines 548–550 as unneeded
- at Module:Lang line 28, add this:
- Other stuff that could be done to further i18n:
- use the mw:Extension:Scribunto/Lua reference manual § Ustring library where appropriate
- create tables of static text rendered or used by the module as a separate ~/Configuration module; some work on this has already been done and can be found in the ~/sandbox; don't know why it was never implemented
- Most of my en.wiki 'career' has been with the cs1|2 module suite. Over time we have made some improvement to aid i18n. Often of those improvements have come from suggestions made at Help talk:Citation Style 1 by editors who were attempting to use the en.wiki module suite on their home wiki. I searched the archives of that page for your name; did not find it. If we don't know about changes that you think should be made to the cs1|2 module suite, the changes want to see will never be made.
- —Trappist the monk (talk) 19:49, 24 December 2021 (UTC)
- @Trappist the monk: No anger here whatsoever. I am highly critical of what is going on, but I am not angry. You are doing what you think is the right thing. (I did send the ping to the wrong person though, so thanks for clarifying that and sorry User:Paine Ellsworth for the confusion I may have caused).
- See my comment below too. Hopefully the 'pudding' part makes it a bit more sweet and less bitter ;) In all seriousness, I think no individual user is at fault here. The problem is systemic, not personal. So why should I be angry at one person? huji—TALK 01:26, 25 December 2021 (UTC)
- It's all good huji, all good. We're all volunteers here so I think we do the best we can with the tools given us. And it does seem to get better over time thanks to editors like you who keep us on our toes. Thanks for that and for your patience! P.I. Ellsworth - ed. put'r there 02:24, 25 December 2021 (UTC)
- Thank you, huji, I usually don't get no respect when I edit templates and modules. One I do have great respect for is Trappist the monk, so when it comes to templates and modules, we both would do well to listen and learn. There will always be challenges when it comes to making one wiki's stuff work on other wikis, but we should never classify improving Wikipedia as a waste of time of any fashion. It is what we are all here for, after all. Happy holidays to you and yours! P.I. Ellsworth - ed. put'r there 00:36, 25 December 2021 (UTC)
- @Paine Ellsworth: The phrase "we should never classify improving Wikipedia as a waste of time of any fashion" is not an accurate description of what is going on with regards to lack of i18n in templates and modules created in enwiki. It is not like enwiki editors (particularly, its more advanced users who edit modules and esoteric templates) are unaware of the fact that enwiki templates and modules are being copied by many other sister projects. The model in which one makes a non-i18n module here and leaves it for others to "improve" it elsewhere, is wasteful. Yes, both parties have produced something useful or "improved" it and thereby generated value. But the value that could have been generated if things were more thoughtfully designed in the first placed would substantially surpass the sum of values generated in this dysfunctional model.
- Then again, I know there have been many efforts to create a central template/module/gadget platform with de facto i18n support (e.g., see phab:T121470 and linked tasks there) and it hasn't gotten anywhere meaningful. Once again, i think this is because incentives are not aligned.
- I am glad you say you like to listen and learn. I just spent 10 or so minutes and reviewed a random sample of pages in the Module namespace that either you or User:Trappist the monk have edited in the last few months. Notably, none of them supported i18n (separation of messages from code logic) and at least for the ones I checked, I did not see any specific code addressing RTL/LTR specifics. The proof is in the pudding. huji—TALK 01:23, 25 December 2021 (UTC)
- I suspect that you are targeting your anger at the wrong editor. I am the editor who suggested that the fa.wiki 'fix' is improper. For the nonce, I think that a better solution is to:
- To editor Trappist the monk: forgive my overly-bold edit – been kickin' meself for not checking with you first. Happy holidays to you and yours! P.I. Ellsworth - ed. put'r there 15:40, 24 December 2021 (UTC)
- Early in this discussion I looked at fa:پودمان:Language/data/iana_languages and noticed that someone had (laboriously) replaced some of the English-language language names with their Persian equivalents. I have tweaked Module:lang/data so that it can, when directed, overwrite some of the English-language names with the names that MediaWiki knows about. The MediaWiki lists of tag/name pairs are much shorter than the IANA list that Module:Lang uses natively. Also, when MediaWiki does not have a language name in the local language for a particular tag, it falls-back to another language (typically English, but not always). Still, most if not all of the ISO 639-1 tags are covered plus a smattering of ISO 639-2, -3 tags. The module ignores the IETF-like language tags that MediaWiki supports. If those are needed, they must be added to the main
override
table. - —Trappist the monk (talk) 23:46, 5 February 2022 (UTC)
Is this a controversial template?
Hi, I have recent reasons to wonder if the Lang template is controversial among Wikipedia editors. Is it, and if so, can you direct me to or elaborate on why? Thought this might be a good place to inquire. – Elizabeth (Eewilson) (tag or ping me) (talk) 17:55, 10 January 2022 (UTC)
- Why would you think so? Examples of the controversy?
- —Trappist the monk (talk) 18:15, 10 January 2022 (UTC)
- My reason for wondering is that in an article that appeared on DYK on 7 January, I had used the template to wrap German words and sentences, using the italic=no setting for the words that were proper nouns. Another editor removed them (not the latest version) soon after it was posted to the main page which, in turn, became a non-productive discussion on the talk page of the article. Another editor suggested I ask around to find out if there are opinions about the template. So I'm asking around. I need help, because either I have the wrong idea of how and/or when it should be used, or the other editor does. The Rationale section and documentation in the MOS explain its usage pretty clearly, I think. – Elizabeth (Eewilson) (tag or ping me) (talk) 18:27, 10 January 2022 (UTC)
- This is not a
{{lang}}
issue per se because the template doesn't define en.wiki style. Rather,{{lang}}
follows the style set by WP:MOS. So, I think that you should close this discussion and open one at a MOS talk page. - —Trappist the monk (talk) 18:48, 10 January 2022 (UTC)
- Will do. So the Rationale section is based on the MOS? – Elizabeth (Eewilson) (tag or ping me) (talk) 18:53, 10 January 2022 (UTC)
- That may be a chicken and egg question. The earliest 'justification' began as the second post in this talk page. Was there any discussion about rationale before that? Don't know.
- —Trappist the monk (talk) 19:31, 10 January 2022 (UTC)
- Per W3C conventions, {{lang}} shouldn’t be used on proper names. Thibaut (talk) 12:14, 6 February 2022 (UTC)
- Will do. So the Rationale section is based on the MOS? – Elizabeth (Eewilson) (tag or ping me) (talk) 18:53, 10 January 2022 (UTC)
- This is not a
- My reason for wondering is that in an article that appeared on DYK on 7 January, I had used the template to wrap German words and sentences, using the italic=no setting for the words that were proper nouns. Another editor removed them (not the latest version) soon after it was posted to the main page which, in turn, became a non-productive discussion on the talk page of the article. Another editor suggested I ask around to find out if there are opinions about the template. So I'm asking around. I need help, because either I have the wrong idea of how and/or when it should be used, or the other editor does. The Rationale section and documentation in the MOS explain its usage pretty clearly, I think. – Elizabeth (Eewilson) (tag or ping me) (talk) 18:27, 10 January 2022 (UTC)
Different behaviour in article space and talk
Hi, I was just adding a section on how to apply {{lang}} to links to the documentation and was mentioning three forms which do not work properly in article space. Oddly enough I found two of them to work in template docs and on article talk:
[[{{lang|en|Book of hours}}]]
→ [[Book of hours]] (never works, obvious)[[Book of hours|{{lang|de|Stundenbuch}}]]
→ Stundenbuch (does not work in article space, works on talk and some other types of pages){{ill|Machsor Lipsiae|de|lt={{lang|he-LA|Machsor Lipsiae}}}}
→ Machsor Lipsiae (does not work in article space, works on talk and some other types of pages)
So, why do the two latter forms not work in article space either? --Matthiaspaul (talk) 22:14, 11 February 2022 (UTC)
[[{{lang|en|Book of hours}}]]
doesn't work because there is html markup in what should become the url which becomes part of an<a href=<url goes here>>...</a>
tag:[[<span title="English-language text"><span lang="en">Book of hours</span></span>]]
- [[Book of hours]]
- For the others in main space, categories.
[[Book of hours|{{lang|de|Stundenbuch}}]]
[[Book of hours|<span title="German-language text"><i lang="de">Stundenbuch</i></span>[[Category:Articles containing German-language text]]]]
- [[Book of hours|Stundenbuch]]
- can't have a category link nested inside a wikilink
- Module:Lang notes the namespace that the calling template is in and allows or inhibits categorization accordingly. Categories are allowed only in main space.
- To link
{{lang}}
renderings in mainspace you must set|nocat=yes
(or|cat=no
). - —Trappist the monk (talk) 00:13, 12 February 2022 (UTC)
- Hi Trappist, the first case was obvious, but I didn't thought of the embedded categories (and was in a hurry and didn't check the code to find it out myself). Thanks for the explanation.
- --Matthiaspaul (talk) 15:47, 13 February 2022 (UTC)
Language name in addition to language code
I would like to suggest to extend the language-recognizing code in all related templates ({{lang}}, {{lang-x}}, {{transl}} for unnamed and relevant named parameters like |code=
) so that they also accept language names and automatically convert them into the corresponding codes internally. Many people are not familiar with the language codes and for them it would be easier to enter something like:
{{lang|German|Tundra}}
and
{{lang|code=German|text=Tundra}}
rather than only
{{lang|de|Tundra}}
and
{{lang|code=de|text=Tundra}}
This would be easy to implement (basically, the code exists already) and consistent with what CS1/CS2, {{r}}, {{rp}} and {{ran}} do already, so it would also be good in regard to achieving a higher level of consistency among template interfaces. (Optionally and without any prio, a bot could occasionally go through articles and replace language names by language codes as it already happens for citations, but personally I would not care if the language names remain in the articles.) --Matthiaspaul (talk) 14:22, 14 February 2022 (UTC)
Fix redirect in {{Langx|grc}}
Hello. Currently the "Ancient Greek" link is set to Ancient Greek language, which is a redirect and isn't really relevant for this use. I'd like to send an edit request that this be fixed to use the direct link, which is Ancient Greek. Thanks. Mr. Lechkar (talk) 15:53, 29 October 2021 (UTC)
- Lang templates automatically link to the article called "XXX language", which is why the redirect exists. Is there something that is broken? – Jonesey95 (talk) 16:23, 29 October 2021 (UTC)
- Redirects are not bad. Wikipedia uses them a lot and has an efficient mechanism for handling them. They work regardless of how the target articles are actually named. Your request appears to have been made to suit your personal preference, is there a more substantive reason for your request? Are there technical or reader-facing issues that will be resolved were we to somehow code-around the use of redirects?
- —Trappist the monk (talk) 16:36, 29 October 2021 (UTC)
- I haven't check but assume that for some of the {{lang-x}} templates, the "X language" link target is the actual page name rather than a redirect.
- I think we should even go one step further and make it a rule that all templates of the {{lang-x}} group should go through a specially crafted (and correspondingly r-cat'ed) redirect for this very purpose like "X (language)" instead of "X language". This would be similar to what we do with all identifiers going through "X (identifier)" redirects. This would help a lot to (further) unclutter "WhatLinksHere" and make it useable again.
- --Matthiaspaul (talk) 14:53, 14 February 2022 (UTC)
Parameter dir=rtl/ltr instead of rtl=yes/no
While for us at enwiki this is most cosmetical only, I think, if we aim to produce a template which is easily portable into other languages (among many other things) we also need to ensure that the parameter interface logic is language-agnostic (even if the parameter names aren't). Our |rtl=yes/no
is seeing the issue from our side only, whereas elsewhere they would rather come up with |ltr=yes/no
. Trying to remain neutral on directionality I think we should offer |direction/dir=ltr/rtl
instead (like HTML does). It would be easy to implement this as alternative (and then slowly fade out the |rtl=yes/no
parameter over the years).
--Matthiaspaul (talk) 15:18, 14 February 2022 (UTC)
Old langwidges
Wondered if we had codes for, specifically, Anglo-Norman, Middle French or Old and Middle English, like we do with e.g. medieval Latin? Or a facility to create them? Not the most common choices I do understand :) TIA! SN54129 16:03, 15 March 2022 (UTC)
- Follow the links in your post and look in the infoboxen.
- —Trappist the monk (talk) 16:08, 15 March 2022 (UTC)
- Thanks very much! Mentioned you in despatches. SN54129 14:33, 16 March 2022 (UTC)