Template talk:Lang
| Template:Lang is permanently protected from editing, and can therefore only be edited by administrators, since it is a heavily used or visible template. Substantial changes should be proposed here, if the proposal is uncontroversial or has been discussed and is supported by consensus. Use {{edit protected}} to attract the attention of an administrator in such cases. Any contributor may edit the template's documentation to add usage notes, categories or interwiki links. |
| This template was considered for deletion on 2006 February 20. The result of the discussion was keep. |
Archives |
|||
|---|---|---|---|
|
[edit] Transclusions of 'missing' ISO 639 templates
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)
- For those using this tool, it should now be a bit more accurate and quite a bit faster. Any problems please let me know. - TB (talk) 20:04, 5 September 2011 (UTC)
[edit] CSS class per language
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)
[edit] Not working for some languages?
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:
- {{lang-eng|working}} gives me English: working, but
- {{lang-efi|mbakara}} gives me Efik: mbakara instead of Efik: mbakara (639-2)
- {{lang-anw|anaang}} gives me Template:Lang-anw instead of Anaang: anaang (639-3)
- {{lang-ibb|ibibio}} gives me Template:Lang-ibb instead of Ibibio: ibibio (639-3)
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)
- There has to be a template for each language. And yes, this is something you could fix yourself, by creating the template {{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)
- Well, thank you very much, that is great. I would maybe have been able to do it myself if I had known where to start. Does anyone think that information on how to do this should perhaps be included in the documentation for this template? Anyway, thanks again. Justlettersandnumbers (talk) 00:28, 17 July 2011 (UTC)
- Well, this template is different than the
{{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)
- Well, this template is different than the
- Well, thank you very much, that is great. I would maybe have been able to do it myself if I had known where to start. Does anyone think that information on how to do this should perhaps be included in the documentation for this template? Anyway, thanks again. Justlettersandnumbers (talk) 00:28, 17 July 2011 (UTC)
[edit] Cleanup banner for articles with non-English text, lacking appropriate markup
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)
[edit] 2 questions
- "Use ISO 639 language codes" is confusing as it leads to a disambiguation page. Can this be disambiguated, or are all entries relevant?
- I quite often provide names in, and translations of, Khoekhoegowab (Special:WhatLinksHere/Template:Contains_Khoekhoe_text lists a few, but by no means all, uses). This language, although spoken by half a million people, seems to have no language code (alternative names: Damara, Nama, Damara/Nama). Would it be possible / a good idea to create a {{lang-kh}} or {{lang-khoe}} template?
--Pgallert (talk) 18:40, 7 October 2011 (UTC)
[edit] The Template:Lang breaks links. Solution needed, please !
Hello,
I have written {{Audio|Nl-Leopoldstad.ogg|''{{lang|nl|Leopoldstad}}''}} →
Leopoldstad (help·info) 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>''}} →
Leopoldstad (help·info). 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)
[edit] Rendering problem
This wikitext:
- was used to translate into Greek the Hebrew word "Messiah" ({{lang| he| מָשִׁיחַ}}).<ref>''Jesus of history, Christ of faith'' by Thomas Zanzig 2000 ISBN 0884895300 page 314</ref>
renders like this:
- was used to translate into Greek the Hebrew word "Messiah" ( מָשִׁיחַ).[1]
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)
- The problem is that the Unicode bi-directional text algorithm can get confused if you have right-to-left characters followed by numbers or punctuation. This has nothing to do with {{lang}}; see this example without:
- was used to translate into Greek the Hebrew word "Messiah" (מָשִׁיחַ).[1]
- The solution is to insert {{lrm}} just after the {{lang}} template. That template contains a character that is a "strong" left-to-right character which causes the following "weak" characters to be interpreted as intended:
- was used to translate into Greek the Hebrew word "Messiah" (מָשִׁיחַ).[1]
- Whether {{lang}} should automatically insert the LRM character is a question for wider discussion. HTH. Anomie⚔ 12:06, 28 February 2012 (UTC)
[edit] Indicating writing script
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)
Cite error: There are <ref> tags on this page, but the references will not show without a {{Reflist}} template or a <references /> tag; see the help page.