This page 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. |
At Wikipedia:Bots/Requests for approval/ZhBot, it was suggested that I run this bot by you guys. The bot will make some systematic replacements to pages that transclude the ((zh))
template, which uses ((lang)) indirectly. This run should have no effect on ((lang)) itself (either how it displays or how it is used), but if anyone is concerned feel free to check out the BRFA and offer input. Thanks, rʨanaɢ talk/contribs 17:35, 13 October 2009 (UTC)
In some articles, particularly ones discussing names in an East Asian language (such as the article "Japanese name"), a version of this template that incorporates the functionality of the ((nowrap)) template could be very convenient. Wrapping all foreign characters in ((lang|...)) is already cumbersome enough. --MQDuck (talk) 04:44, 7 January 2010 (UTC)
((LANG))
, ((wlang))
, or ((langw))
. I think I slightly prefer ((langw))
.((langnw))
is somehow less intuitive. ((langw))
sounds good enough to me, though I wouldn't mind if we could get some more suggestions.The documentation here needs to tell us how to keep this nasty template from gobbling up birth dates or whatever when it is used. The dates or other text can appear fine on the edit page, then when the edited article shows up, this template sometimes eats other text around it. Gene Nygaard (talk) 23:56, 28 January 2010 (UTC)
Is there a way to include a link with this template in it?
[[Pâtissier|((lang|fr|Pâtissier))]] does not work: Pâtissier
It has to be ((lang|fr|[[Pâtissier]])): Pâtissier
174.3.98.236 (talk) 04:53, 8 February 2010 (UTC)
Is it possible to add a CSS code like src: url(.../xyz.ttf) format("truetype")
to this template? Because some special characters (like the Etruscan version of Odysseus, 𐌄𐌂𐌖𐌈𐌖) need special fonts ("MPH 2B Damase" in this case) that most Wikipedia users don't have and probably don't even know where to get from. --bender235 (talk) 13:34, 10 January 2010 (UTC)
@font-face {
font-family: Damase;
src: url(.../Damase.ttf) format("truetype");
}
span[lang=ett], *:lang(ett) {
font-family: Damase, Arial Unicode MS, sans-serif; /* or some such */
}
((editprotected))
In order to avoid the main page being categorized by this template, would you be able to change this template's categorization method (well, I admit the "real" fix to this would be to move it out of the main space, but since that's unlikely to happen, we gotta go with this solution). The code should be changed to the following:
<span lang="(({1))}" xml:lang="(({1))}">(({2))}</span>((Cat handler |main=[[Category:Articles containing ((#switch:(({1|))} |ar = Arabic |es = Spanish |de = German |fr = French |ja = Japanese |zh = Chinese |bg = Bulgarian |cs = Czech |da = Danish |nl = Dutch |et = Estonian |fi = Finnish |el = Greek |hu = Hungarian |ga = Irish |grc = Ancient Greek |la|lat = Latin |cy = Welsh |sl = Slovene |slv = Slovene |en|eng = explicitly cited English |#default = ((#ifexist:Category:Articles containing ((ISO 639 name (({1|))))} language text |((ISO 639 name (({1|))))} |non-English )) )) language text]] ))
Thanks, --The Evil IP address (talk) 21:58, 2 June 2010 (UTC)
((editprotected))
The current change breaks every template that uses this meta-template, because the category markup is not properly closed (no closing brackets). Please fix immediately. — Gavia immer (talk) 01:46, 3 June 2010 (UTC)
| non-English )) )) language text]] ))<noinclude>
| non-English )) language text]] )) ))<noinclude>
Whatever was done to the template made it completely broken. There are a bunch of red link categories across the project.—Ryūlóng (竜龙) 03:48, 21 June 2010 (UTC)
((editprotected))
This template was recently changed by User:Good Olfactory apparently because of decision made at Wikipedia:Categories for discussion/Log/2010 June 3#Category:Articles containing explicitly cited English language text. This change added a hyphen to each category name and now articles that use this template are moved from categories like Category:Articles containing Czech language text to non-existent categories like Category:Articles containing Czech-language text (note the hyphen). I think this change should be reverted until all the 240 subcategories of Category:Articles containing non-English-language text are created. Svick (talk) 23:26, 21 June 2010 (UTC)
So what should we do now? Ignore the CfD and delete the new hyphenated category (and its one subcategory Category:Articles containing German-language text that someone created)? Reopen the CfD? Or something else? Svick (talk) 15:52, 22 June 2010 (UTC)
How about this (to be added right before the noinclude tag): ((#if:(({3|))}| <i lang="(({1))}-Latn" xml:lang="(({1))}-Latn">(({3))}</i>))((#if:(({4|))}| "(({4))}"))
? --A. di M. (talk) 11:46, 1 February 2011 (UTC)
It's probably an error on my part, but the template seems not to be working for some languages with ISO 639-2 and 639-3 codes:
Is this something I can fix myself, say by editing a list somewhere? Or does it require expert intervention? I only actually need it to work for Efik, the other two are for comparison only. Thank you, Justlettersandnumbers (talk) 12:04, 16 July 2011 (UTC)
((lang-efi))
. To know how, you could look at the code of ((lang-en))
and copy it while modifying the language-specific bits. And ideally create the documentation subpage too. I have went ahead and done that. User<Svick>.Talk(); 22:48, 16 July 2011 (UTC)
((lang-xx))
templates. ((lang))
is used to show some text in a foreign language. ((lang-xx))
are used to display some text along with the language it is in. User<Svick>.Talk(); 02:13, 17 July 2011 (UTC)I have created ((Cleanup-lang)), for articles with non-English text, which should use ((Lang)) but do not yet do so. Suggestions for improvements would be welcome. Andy Mabbett (Pigsonthewing); Andy's talk; Andy's edits 21:38, 28 August 2011 (UTC)
As part of an unlrelated task, I've found quite a few attempts to transclude ISO_639_name templates that don't exist. While many of these will be typos, some may represent language templates that it would be useful to create.
For general interest, I've added a toolserver report that shows these transclusions and the pages on which they occur. - TB (talk) 23:46, 7 December 2010 (UTC)
--Pgallert (talk) 18:40, 7 October 2011 (UTC)
Might it be possible to to plug in CSS class names into this template, based on the language code being used? Something like class="lang-(({1))}"
, or something similar. This could help users with custom style sheets better control the appearance of text in a specific language while using this template. - Gilgamesh (talk) 13:49, 28 April 2011 (UTC)
Never mind, I found a way. Where XYZ
is the language code, the CSS class is to span:lang(XYZ)
. - Gilgamesh (talk) 00:27, 29 April 2011 (UTC)
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Hello,
I have written ((Audio|Nl-Leopoldstad.ogg|''((lang|nl|Leopoldstad))''))
→ ⓘ in an article, and this gets broken.
Even a simple link like [[Kinshasa|((lang|nl|Leopoldstad))]]
→ Leopoldstad gets broken.
Here in discussion, as well as in the Sandbox, it is fine. But in articles, the Template:Lang breaks the links.
I guess the culprits are the Categories.
For [[Kinshasa|((lang|nl|Leopoldstad))]]
, I know a workaround, albeit not a nice one. But for ((Audio|Nl-Leopoldstad.ogg|''((lang|nl|Leopoldstad))''))
, I am going to write ((Audio|1=Nl-Leopoldstad.ogg|2=''<span lang="nl" xml:lang="nl">Leopoldstad</span>''))
→ ⓘ. Which is really heavy ! Or I don't language-tag the Dutch text at all — which is is bad for accessibility. Using the Template:Lang would be much nicer. So can you please provide an option, or a brother Template, for not adding the Categories ? Thanks.
--Nnemo (talk) 12:16, 1 November 2011 (UTC)
((lang|nl|Leopoldstad|nocat=true))
to disable the categories. Happy‑melon 14:50, 24 May 2012 (UTC)This wikitext:
renders like this:
When rendered, the parentheses are out of place, and the citation link is broken in two. Can someone please sort this out? Thanks. --99of9 (talk) 09:13, 11 December 2011 (UTC)
This template's documentation section on Indicating writing script deals with templates of the type ((lang-ru)) rather than ((lang)). Can we find a better home for it, then link to that? Or replace the examples with some using this template? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 11:46, 28 February 2012 (UTC)
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Could we add a span class to this template, so that it (foreign language text) can be formatted by the user? Liam987 16:47, 5 May 2012 (UTC)
((Official website))
has the class "official website". A scenario where this would be useful (and the way I intend to use it) would be for editors to set the class of this template to a different color in their common.css page so that they can see immediately if any foreign-language text on the page is not using this template. Liam987(talk) 13:41, 24 May 2012 (UTC)
span[lang] { ... }
. You could also use something like span[lang|="en"] { ... }
to match only spans being marked as English. Or is it necessary to match this specific template's output rather than any other template or manual language marking? Anomie⚔ 17:25, 25 May 2012 (UTC)When you've worked out how best to do this, please put the code in the /sandbox and reactivate the request. — Martin (MSGJ · talk) 17:32, 29 May 2012 (UTC)
The following sentence under "Undetermined language" is missing a word or a comma: "Many times the character/symbol is used in several languages, but when the article refers to the grapheme itself the ISO 639-2 and ISO 639-3 language code und for Undetermined language". Katana (talk) 04:00, 30 July 2012 (UTC)
Please see my proposal at Template talk:Lang-en#This template could supply sorely missed language support functionality on Wikipedia. __meco (talk) 11:26, 8 September 2012 (UTC)
Should this template be used in the case of Fraternity and Sorority letters in articles about them or in articles about American Colleges and Universities? On these Articles, if you are lucky, you get ΣΑΕ (all greek), if you aren't, you get ΣAE (one greek and two latin look alikes. (which I try to correct)Naraht (talk) 10:40, 12 September 2012 (UTC)
In Wikipedia:Manual of Style/Text formatting, it is noted that Chinese characters shouldn't be italicized. However in templates such as template:Infobox book, the field of original title (where Chinese is likely to appear) still use Italics. I've made suggestions to change that template, but I wonder if the lang template can protect Chinese from Italics?114.25.189.86 (talk) 03:45, 13 September 2012 (UTC)
The MediaWiki software no longer passes the xml:lang
attribute, but it is automatically added when the lang
attribute is defined. Therefore, xml:lang
can be removed as redundant.
You can check this by viewing the source of this page:
Markup | Renders as |
---|---|
<span xml:lang="en">text1</span> <span lang="en">text2</span> |
text1 text2 |
--— Gadget850 (Ed) talk 19:02, 9 January 2013 (UTC)
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Add |zh-cn = simplified Chinese to the template per Wikipedia:Categories_for_discussion/Log/2013_February_10#Chinese_text
Armbrust The Homunculus 21:37, 25 February 2013 (UTC)
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
There seems to be a bug in the template that is not permitting it to correctly parse the following code in main space:
"approaching from the opposite side of the [[Krbava|Krbava ((lang|hr|Polje))]] (((lang-hr|[[Polje]])) or [[karst|karst field]])"
This code seems to parse correctly in user space, talk space, and usertalk space.
Thank you very much for your help! - ʈucoxn\talk 01:51, 12 March 2013 (UTC)
((lang|...|...))
can't be used inside a wikilink? I was trying to use the template to indicate that there's a word in a foreign language, so spell checkers and bots don't mistake it for an error. - ʈucoxn\talk 10:47, 19 March 2013 (UTC)((lang|hr|[[Krbava|Krbava Polje]]))
instead (putting the link in the ((lang)) rather than the ((lang)) in the link)? Chris Cunningham (user:thumperward) (talk) 15:36, 19 March 2013 (UTC)
Not done: There isn't a simple fix for this - it's inherent in the mediawiki software, and would need to be fixed at the software level, if at all. However, there are a couple of ways to work around it, and neither requires editing the template.
[[Krbava|Krbava ((lang|hr|Polje|nocat=true))]][[Category:Articles containing Croatian language text]]
[[Krbava|Krbava <span lang="hr">Polje</span>]][[Category:Articles containing Croatian language text]]
Hopefully one of these methods will work for you, because the template can't be fixed, I'm afraid. — Mr. Stradivarius ♪ talk ♪ 05:47, 28 March 2013 (UTC)
Should there be any limit to the use of this template on a page? I've been adding it to all instances of foreign names in Wordless novel; it seems to me that would be necessary for screen reading software, but I can also imagine people complaining about the page being plastered with this template. Curly Turkey (gobble) 01:29, 18 March 2013 (UTC)
It would be good to link to a list of the specific languages. As it stands, it mentions a couple of those languages, but which ones are available? Schwede66 18:33, 12 April 2013 (UTC)
"Latin" is getting formatted as a link to Latin language, which is a redirect to Latin. Curly Turkey (gobble) 04:49, 1 May 2013 (UTC)
This template is now screwing up the formatting for languages it does not specifically support, such as Sorbian, at least on my browser: The words are all bold and significantly larger than the surrounding text, making it look rather ridiculous. Has something been changed recently that can be changed back? — kwami (talk) 21:21, 28 April 2013 (UTC)
((lang|grc-Latn|test text)) (which is quite widely used) renders as test text. The text will be in the font set in your browser as the default for Greek characters. However, this is wrong: the text is the Latin alphabet version of the Greek and should be in the font used for Latin characters, i.e. the normal font for English text. I'm not sure where this should be fixed, but until it is, I don't think this language option should be used. (If it's felt important to mark Latin alphabet transcriptions of Greek in some way, then surely "lat-grc" would be better?) Peter coxhead (talk) 08:52, 11 July 2013 (UTC)
It looks like we could obviate the need for the big ugly switch statement that's currently in the template, add support for a lot more languages, and probably deprecate most of the Lang-xx templates by incorporating Template:ISO 639 name here. Thoughts? Ibadibam (talk) 23:02, 16 August 2013 (UTC)
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Import sandbox to get rid of the unnecessary switch. — Lfdder (talk) 00:05, 7 September 2013 (UTC)
Sooooooo? — Lfdder (talk) 12:14, 10 September 2013 (UTC)
Does anyone know why or how Template:Lang-non template produces a different font to Template:Lang-gd? The code looks the same to me. Ben MacDui 12:55, 21 September 2013 (UTC)
Would it be possible to have the option to switch of the automatic italic formatting in lang-xx
? It is useful when translating words, but makes the template unusable when translating proper names, which according to MOS:Ety should not normally be italicised. Or perhaps there already is such a possibility and I just haven't found it? Justlettersandnumbers (talk) 15:24, 21 September 2013 (UTC)
((lang-fr|((noitalics|french stuff))))
→ French: french stuff. — Lfdder (talk) 17:33, 21 September 2013 (UTC)
Where can I see which fonts are used? I haven't been able to see anything but blank spaces for a lot of languages, such as Javanese, Yoruba, and Bavarian, ever since I switched on automatic font downloading to display Burmese (I have Burmese fonts installed, but MS7/FF does not support them). I've now switched it off, but am stuck with blank spaces for this template and a lot of section headings. — kwami (talk) 17:45, 1 May 2014 (UTC)
<span lang="yo" xml:lang="yo">èdè Yorùbá</span>
I've used lang-XX before to indicate language (XX being the language code), however, when I tried to do it for Hmong it couldn't find the template (lang-hmm), how would I properly use the template for this language? — Preceding unsigned comment added by JMJimmy (talk • contribs) 20:50, 10 August 2014 (UTC)
Be aware though that this pattern works only for languages for which the article (or a redirect) is titled X language. For something like Mashan Miao, I think it'd be
((Language with name|hmn|Miao|''(({1))}''|links=(({links|yes))))}<noinclude>((documentation|Template:Lang-x/doc))</noinclude>
...but that leaves an irregularity with the documentation template I'm not sure how to resolve. Ibadibam (talk) 20:23, 12 August 2014 (UTC)
((Language with name|hmm|((#ifeq:(({links|))}|no|Mashan Miao|[[Mashan Miao]]))|''(({1))}''|links=no))<noinclude>((documentation|Template:Lang-x/doc))</noinclude>
Several ((Lang-xx-YY))
templates have been nomintead for deletion. Participants here may be interested in those TfDs, pro or con.
See also:
The nominator raised related issues in a number of other forums (most of these deal with ((lang-xx-YY))
templates in particular, while the one at WT:NOT is more general):
— SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼ 07:16, 19 August 2014 (UTC)
Hello – For the sake of scripts such as Arabic that can be tricky to read at default font-size, I've added a size parameter to the sandbox version here (current as of this message) and some tests to Template:Lang/testcases#Sandbox. Would there be any objection if a request was made to replace the main version with this one? Sardanaphalus (talk) 12:09, 17 August 2014 (UTC)
This edit request to Template:Lang has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Per the above, please replace the current code with this version in the sandbox. Sardanaphalus (talk) 00:07, 17 September 2014 (UTC)
((edit protected))
template. --Redrose64 (talk) 06:53, 17 September 2014 (UTC)
|style=
, which make it far more difficult to compare old with new. Why is it necessary to change the capitalisation of the templates? Why introduce a newline before the ((category handler))
, hidden inside comment markers? Why remove all the newlines within the ((category handler))
? Why was the comment at the bottom, concerning categories, removed? I don't see the necessity for any of these, especially not the newline removal. --Redrose64 (talk) 09:34, 17 September 2014 (UTC)<span>(( | = [[ (( || = | = (( |(()) | )) )) ]] | = ))
<span><!-- -->(( | = [[ (( ||= |=(( |(()) | )) )) ]] | = ))
<span><!-- -->(( | = [[ (( || = | = (( |(()) | )) )) <!-- -->]] | = ))
In order to prevent a chunk of Arabic (etc.) in a citation title from interfering with the direction of following text, you need to use ((lang)) with the |nocat=true
parameter, thus: ((lang|nocat=true|ar|.شبكة))
. As an example:
((cite web))
: Invalid |ref=harv
(help)((cite web))
: Invalid |ref=harv
(help)I've clarified this in the documentation. — Scott • talk 11:42, 18 March 2014 (UTC)
Please don't use this template in citation templates. The included markup renders in the title field of the COinS metadata:
Markup | Renders as |
---|---|
((cite book |title=IANA Delegation Report for ((lang|nocat=true|ar|.شبكة)))) |
IANA Delegation Report for .شبكة.
|
We are adding a new parameter to the templates:
Markup | Renders as |
---|---|
((cite book/new |title=IANA Delegation Report for |script-title=ar:.شبكة)) |
IANA Delegation Report for .شبكة. |
script-title: Title in the original writing system where it is not appropriate to italicize (e.g. Arabic, Chinese, Hebrew, Japanese). Displays after title in upright font and is isolated from the surrounding text-direction settings so that right-to-left scripts render properly. The language may be set by prefixing the value with the ISO 639-1 two-character language code followed by a colon. Unrecognized codes are ignored and will display in the rendered citation. Example: |script-title=ar:العربية
.
This should be going live soon. -- Gadget850 talk 12:44, 3 October 2014 (UTC)
|script-title=
is concatenated with the value held in |title=
into meta-parameter Title
, |title=
is not required. Editor Scott's example cite might be written like this:
((cite web/new|url=http://www.iana.org/reports/c.2.9.2.d/20131021-xn--ngbc5azd|accessdate=3 February 2014|script-title=IANA Delegation Report for شبكة |year=2013))
((cite web))
: Invalid |script-title=
: missing prefix (help)|script-title=
. I left out the language identifier part of |script-title=
because of the mix of English and Arabic.|script-title=
does is isolate strongly directional text from not so strongly direction text. The English and the Arabic are strongly directional so they can coexist pretty comfortably; the digits are not. So, if the title was "IANA Delegation Report for شبكة 2013", then |script-title=
is no help:
((cite web))
: Invalid |script-title=
: missing prefix (help)Please see Template talk:Engvar#Use standard language codes; could use some extra brains on that. ((Engvar)) didn't even have a talk page until just now, so virtually no one is watching it. — SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼ 06:52, 7 November 2014 (UTC)
In Latin spelling and pronunciation and a few other articles, an epigraphic style (meaning based on the style of lettering used in inscriptions) of Latin text is used. That is, Latin words and graphemes are presented in small caps, with v and i used instead of i, j and u, v, and acute accent and the i longa (U+A7FE) used for long vowels in place of macrons. Epigraphic Latin needs two CSS properties: font-variant: small-caps;
and font-family: 'fonts with i longa in them';
. In addition, it should have the selector lang="lat"
.
Applying class=Unicode
to epigraphic text is not a solution, because the fonts for that class in MediaWiki:Common.js are Arial Unicode MS and Lucida Sans Unicode, which do not contain the character i longa. See LATIN EPIGRAPHIC LETTER I LONGA (U+A7FE) Font Support on FileFormat.Info and ((Latin-epigr)) for a list of some fonts that do. To allow the character to display properly, we need a separate list of fonts for Latin epigraphic text.
Small caps are currently achieved using the ((smallcaps)), but this simply adds inline CSS.
The most elegant solution would be to apply the language code and a class to the text — perhaps class="epigraphic"
or class="epigr"
— and add the properties to text selected by both the language code and the class using an external CSS file, like MediaWiki:Common.js. (A class is required because not all Latin text is in epigraphic style.) The second most elegant solution is to create a template using inline CSS, as I have already done with ((Latin-epigr)). But using selectors and an external style sheet would reduce the amount of code.
Is this proposal possible, or should I settle with a template using inline CSS? — Eru·tuon 21:11, 13 December 2014 (UTC)
As discussed here previously, the left-to-right mark (‎
) can help browsers determine when to switch back to left-to-right rendering. I've noticed that it's being manually included at the end of RTL templates such as ((lang-ar)) and ((lang-ur)). This seems to be an easy candidate for automatic inclusion in this template when the rtl
argument is specified. Does anyone have any concerns over such an inclusion? — Quoth (talk) 16:38, 20 May 2015 (UTC)
|rtl=
does not seem to be documented. -- Gadget850 talk 22:07, 20 May 2015 (UTC)<bdi>...</bdi>
. This isolates text directionality from the outer text so it doesn't matter. — Preceding unsigned comment added by Gadget850 (talk • contribs) 23:38, 20 May 2015 (UTC)
<span>...</span>
tags with <bdi>...</bdi>
tags in ((lang))
. The attributes added to the <span>
tag in ((lang))
are supported by <bdi>
. The attribute dir=
could probably go away. Module:Citation/CS1 wraps titles provided with |script-title=
inside <bdi>...</bdi>
tags but doesn't set the dir=
attribute.((lang-ar))
includes ‎
in its output. That character is probably not needed with <bdi>...</bdi>
.<bdi>...</bdi>
, this will permit elimination of ‎
which often cause problems with copypaste. The <bdi>...</bdi>
element is inherently dir=auto
so if the enclosed text is entirely of a single direction, no explicit dir=
attribute should be needed either. --Redrose64 (talk) 07:07, 21 May 2015 (UTC)
<bdi>...</bdi>
sounds like the ideal solution. Unfortunately I'm not so sure we should use it at the moment for compatibility reasons. It seems to have been introduced as part of HTML5, and might not be supported by a wide enough variety of browser versions.[2] We should thoroughly test this across browsers and platforms before implementing it.<bdo>...</bdo>
,[3] which was introduced in HTML4, and seems to currently have much broader support. I've yet to do any testing of either myself, and am going purely on what's currently written on the MDN, which is by no means up-to-date. — Quoth (talk) 09:41, 21 May 2015 (UTC)
<bdi>...</bdi>
but does support <bdo>...</bdo>
. -- Gadget850 talk 11:18, 21 May 2015 (UTC)<bdi>...</bdi>
for cs1|2 I remember looking at the compatibility issue. If I remember correctly, the incompatibilities for current browsers were in the less often used attributes. I don't remember where I discovered that and don't have the time now to rediscover it. If I wrote about it, that writing will be in the Help Talk: Citation Style 1 archives.<bdo>...</bdo>
no longer seems applicable for this situation. Its intended use seems to be only to override unicode's bidi algorithm for a stretch of text (forcing LTR to RTL or vice versa), but without the text isolating property that <bdi>...</bdi>
has. This means that numbers and other weak characters which follow still become entangled in the preceding text direction. And like Gadget850, I was unable to get <bdi>...</bdi>
to have any effect in IE11 (with or without CSS shims and element attributes). Unfortunately the only method I found to work correctly in IE11 was using ‎
.This edit request to Template:Lang has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please replace the current code with this revision in the sandbox per the above discussion. An example of what this fixes has been added to the test cases page. — Quoth (talk) 08:49, 28 May 2015 (UTC)
‎
example ((lang-ar))
; insource:/\‎/‎
in language templates; example Arabic language; insource:/\‎/-- Gadget850 talk 15:43, 28 May 2015 (UTC)
In the René Lavand article I'd like to markup the sentence
which currently uses no language template. Yet neither ((lang)) nor ((lang-es)) are optimal here. With ((lang)) I could easily tag the Spanish phrase but there's no way to attach the translation to the template. The markup would look like
which renders as
And ((lang-es)) markup
renders rather awkwardly:
and would require a rewording.
Seems to me that a reverse version of ((lang-es)) is needed or ((lang)) needs an additional translation parameters. Ideally editors should be able to do something like
which would render as exactly as the current text. How would you handle this case? Jason Quinn (talk) 11:22, 19 June 2015 (UTC)
The doc begins
That's very nice, but if you follow the link you get a stub that discusses the issues of classification and coding and lists eight systems of assigning language codes, but gives no clue as to which system to use for Template:Lang. How in Hades is an editor to find the code to use for a language? Please ((Ping)) me to discuss. --Thnidu (talk) 03:42, 15 July 2015 (UTC)
((lang |ISO 639 language code |text))
It seems there is no Balinese language ID for the Lang- template yet. Hippo99 (talk) 09:14, 27 October 2015 (UTC)
Is it legal to input more than a single language code? I have some text which can be either Spanish or Portuguese: Hospital de Clínicas. Thanks. fgnievinski (talk) 02:43, 23 January 2016 (UTC)
Notably en-AU, en-CA, en-GB, en-IE and en-US. Text tagged with these codes should go into something like:
which should be subcategories of Category:Articles containing explicitly cited English-language text.
The code I have in the sandbox should achieve this.
Moreover any types which don't have a category will be categorised into Category:Articles containing explicitly cited variant English-language text. This means uses of en- codes which don't have a category - or even an ISO 639 template - will not be categorised as non-English text.
I also added a "|" sign after (({2 for cosmetic purposes.
I also switched from ((Category handler))
to ((Main other))
for efficiency. This means discarding the "nocat" variable, which I don't see as a loss.
Comments?
All the best: Rich Farmbrough, 19:22, 15 November 2015 (UTC).
This clean semantic markup fails for no apparent reason in mainspace:
[[World view|''((lang|de|Weltanschauung))'']]
[[Coverture|''((lang|fr|Feme Covert))'']]
It renders as:
This does not happen outside mainspace, at least not on in the Talk:
and Wikipedia:
namespaces (the only two I tested); they both render these testcases exactly as intended:
Moving the italics outside does not fix it (they have nothing to do with the issue). Naming the parameters does not help, either. Nor does encoding the template's |
characters with ((!))
.
You can do:
[[Variable|((var|X))]]
and it will properly render as:
including in mainspace.
It's not the presence of parameters (named or unnamed) causing the problem. Using:
[[Variable|((var|X|2=junk_data))]]
will still produce output of
in mainspace.
This is a problem with ((lang))
in particular, in a certain namespace (or namespaces).
It is highly desirable for the [[Title|''((lang|xx|content))'']]
markup to work as-is, for metadata cleanliness, since neither the italicization nor the linking to the English article are really part of the German or French content (in the examples). Doing things like "((lang|de|''[[World view|Weltanschauung]]''))
" is semantically bletcherous, and thwarts our likely desire to re-use code from the initial linked instance elsewhere in the article, by copy-pasting the ''((lang|de|Weltanschauung))''
part without the link code.
— SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼ 22:16, 14 February 2016 (UTC)
[[World view|''<span lang="de" >Weltanschauung</span>[[Category:Articles containing German-language text]]'']]
((lang))
output. The category link within a wikilink confuses MediaWiki. I don't think that this is something that can be fixed in this template.''[[World view|((lang|de|Weltanschauung))]]''
''[[Coverture|((lang|fr|Feme Covert))]]''
Renders as:
This is reasonable I think. All the best: Rich Farmbrough, 22:44, 14 February 2016 (UTC).
(edit conflict) Oh! Right. Forgot about the category thing. Hmm. It's actually undesirable that people will de-categorize just to link; that's a kluge. The solution is to add a |link=
parameter, so that we'd do: ''((lang|de|Weltanschauung|link=World view))''
instead of [[World view|''((lang|de|Weltanschauung|nocat=y))'']]
(FAIL) or ''((lang|de|[[World view|Weltanschauung]]))''
(bletcherous). Have the parameter apply the link around the content, with the cat. outside of it. While I would not get the in-page, copy-pasteable code portability I was initially looking for, this still would be an overall improvement, in multiple ways. Editors are actually quite amenable to using link-formatting templates (((Cuegloss))
alone is used in over 700 articles; we have a category tree of them at Category:Internal link templates). After some bot-assisted cleanup (look for any instances of the template with nocat
that are inside links), we'd have a much more accurate count of the articles in these language categories, too. — SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼ 08:33, 15 February 2016 (UTC)
Is it appropriate to use this template around a wikilink in the English-language wikipedia when the link text is in another language? For example, ((lang|fr|[[Académie française]]))
? Does the answer depend on whether the link contains characters/diacritics not normally seen in English, or if it does but it's nonetheless a phrase used in English (e.g. ((lang|fr|Fin de siècle)))
, ((lang|de|Götterdämmerung)))
or whether the title has no special characters but contains words that wouldn't pass an English spell checker (e.g. Arc de Triomphe)? Colonies Chris (talk) 09:49, 26 February 2016 (UTC)
I'm having difficulty getting right-to-left Arabic strings to break correctly at the end of a line. For instance, in my Sandbox there are examples (originally from the Saudi Arabia article) where "آل سعود" breaks incorrectly, with آل on the first line and سعود on the second. (If you can't replicate this in your browser change the size of the browser window to get آل سعود breaking at the end of a line. I've used template lang and lang and lang-ar and they all result in incorrect breaking. The template instructions in the Section "Writing direction" say:
|
parameter...but I don't understand what that means. Thanks for any help Shhhnotsoloud (talk) 10:44, 27 April 2016 (UTC)
|rtl=yes
parameter". --Redrose64 (talk) 11:34, 27 April 2016 (UTC)
I wanted to use this template to mark a word as Sanskrit, but I’m not sure if I should insert the 2-letter code or the 3-letter code? The article contains a link to the ISO 639 table, but that redirects to a list of 5 different tables, flabbergasting the uninitiated! So my plea is: please include an indication which table(s) should/may be used in this template, and maybe update the link accordingly. Thanks! Geke (talk) 11:54, 1 April 2016 (UTC)
sa
or san
, but my browser (Firefox 45.0.1) seems to only recognise sa
. --Redrose64 (talk) 21:50, 1 April 2016 (UTC)
I just noticed a strange interaction with ((lang)) -- I don't know if it's user error, a known issue, or an unforeseen glitch. I'll leave it to those who know what they're doing to sort out what, if anything, to do about it.
Lines of verse are commonly indented with :
(although other methods are also available). So...
<poem> :Text Text :Text </poem>
...renders as:
Text
Text
Text
Applying ((lang)) within <poem>...</poem>
breaks down in 2 different ways, depending upon how <poem>...</poem>
is applied:
<poem> ((lang|fr|:Texte Texte :Texte)) </poem>
...renders as:
[undefined] Error: ((Lang)): no text (help)
And
((#tag:poem| ((lang|fr|:Texte Texte :Texte)) ))
..renders as:
:Texte Texte :Texte
As I mentioned, other methods are available to indent verse, but I thought I'd point this out in case it's a relatively easy fix, or points to other possible problems with the template. Cheers. Phil wink (talk) 15:33, 14 September 2016 (UTC)
((lang))
template emits a <span>...</span>
element, which in HTML terms, is an inline element, and must not be used to enclose block-type elements. The <poem>...</poem>
extension emits a <div>...</div>
element, which is block-type; similarly, the colon markup, often used as an indent feature, produces an association list - and lists are always block-type structures. Therefore, neither of these may be placed inside a <span>...</span>
, and thus not inside a ((lang))
. Rather than trying to misuse the template, you can apply the lang=fr
attribute directly to the <poem>...</poem>
structure, as in <poem lang=fr>
:Texte
Texte
:Texte
</poem>
Texte
Texte
Texte
<div class="poem" xml:lang="fr" lang="fr">...</div>
, so your problem lies not this template but in the way that it's used. --Redrose64 (talk) 21:31, 14 September 2016 (UTC)((#tag:poem))
built into it, so in the near-term <poem lang=fr>
is not an option, unless I want to add that as a parameter -- but also, this value often contains both non-English text and a ref (which typically is in English), so I'm not certain painting the whole value with one language would be appropriate. But, just so I'm sure I understand you: (1) ((lang))
inside <poem>...</poem>
is not a problem -- but :
inside ((lang))
is a problem. So the most bone-headed fix is just to use another indentor. Right? and (2) Only the initial colon renders badly (at least for me): is it only this initial colon that makes trouble within ((lang))
, or must I avoid them at all line beginnings? Thanks again. Phil wink (talk) 22:22, 14 September 2016 (UTC)
|lang=
parameter to ((Verse translation)). It appears to work correctly: applying the lang="" xml:lang=""
attributes only to the foreign-language poem, not to the translation or attribution. Let me know if this is a satisfactory solution. — Eru·tuon 22:33, 14 September 2016 (UTC)<ref>...</ref>
at the end, which cannot be assumed to be in that same language. Moreover, this would disallow correct tagging for macaronic verse (which I haven't yet formatted, but does exist), and cases like:((Verse translation|italicsoff=y| ((lang|ja|菊の香や))((pad|1.9em)) ''((lang|ja-latn|Kiku no ka ya))'' ((lang|ja|奈良には古き)) ''((lang|ja-latn|Nara ni wa furuki))'' ((lang|ja|仏達))((pad|3.8em)) ''((lang|ja-latn|Hotoketachi))'' |attr1=Bashō| In the city of Nara Fragrance of chrysanthemums; Buddhas of yore.<ref>For an alternative translation, see De Bary et al. (2001: 368).</ref>))
菊の香や Kiku no ka ya |
In the city of Nara |
—Bashō |
References
lang="" xml:lang=""
attributes. Perhaps a solution would be to always place the ref for the foreign-language text in the |attr1=
parameter, after the name of the work? — Eru·tuon 23:54, 14 September 2016 (UTC)|lang=
parameter for Japanese verse that is juxtaposed with its transliteration — or create a parameter that creates a table cell for the transliteration, and has a separate language parameter, maybe |trans-lang=
? — Eru·tuon 23:56, 14 September 2016 (UTC)While looking at the latest Special:WantedTemplates report, I saw that there are a lot of transclusions of ISO 639 templates that do not exist. Specifically, 73 of the top 500 most-transcluded nonexistent templates are ISO 639 templates.
I'm going to play around with the sandbox to see if I can add a maintenance category to list pages calling templates that do not exist. That way, we could be alerted to (a) typos and errors and (b) templates that should exist but do not. – Jonesey95 (talk) 03:30, 29 September 2016 (UTC)
((lang|sp))
instead of ((lang|es))
for Spanish-language words. Using the sandbox version of the template adds Category:Articles containing unknown ISO 639 language template to the category list. If this category is created, I intend it to be a hidden category. – Jonesey95 (talk) 03:48, 29 September 2016 (UTC)This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
See above. Please copy the sandbox into the live template to add a tracking category for unknown ISO 639 name templates. I have checked the testcases page and tested the sandbox in a live article. – Jonesey95 (talk) 16:31, 30 September 2016 (UTC)