Template talk:Lang

From Wikimedia Commons, the free media repository
Jump to: navigation, search
Info non-talk.svg Template:Lang has been protected indefinitely because it is a highly-used or visible template. Use {{Edit request}} on this page to request an edit.

This template is protected be cause it is used a lot - vandalism would be visible on hundreds of wikis on several hundred thousand pages. Also, editing a template causes every page that uses the template to be re-rendered, causing massive server load. So, discuss below, test elsewhere, and keep edits to a minimum. -- Duesentrieb(?!) 13:57, 1 February 2007 (UTC)


Class[edit]

This template now puts two classes on a piece of text. Is this intented? Now it adds "description" and "the language". Might be useful to have something like

class="description-{{{1}}}

or

class="i18n-description i18n-description-{{{1}}}">

. Multichill (talk) 12:11, 27 November 2008 (UTC)

als[edit]

{{editprotected}} Bitte hinzufügen: Template:Insignia/als. Danke, --Strommops ð 19:30, 26 August 2009 (UTC)

✓ Done That should have gone to Template talk:Insignia/lang, but OK, I’ve updated that template. --Mormegil (talk) 20:20, 26 August 2009 (UTC)

lang[edit]

xml:lang is now added automatically by the MediaWiki software. Sanitizer.php no longer passes it, so the 'lang' parameter is redundant. --Gadget850 (talk) 18:10, 29 September 2013 (UTC)

I agree, but the redundant attribute is xml:lang="", just keep lang="".
Also, for correct inclusion of text in a foreign language, tagging the language is not sufficient, we should use a "bdi" HTML element instead of just a "span", so that changes of writing direction will be constrained inside it and will not alter the direction of the text outside (the entire bdi element will be transparent). In addition descriptions has absolutely no style associated to it by stylesheets in commons.
the class description should better be external, generated by other templates that really generate descriptions
Also I don't understand why it forces the CSS class description when this template is not just intended to be used only in descriptions, but as well in headings, legends below images, table cells, button captions, table captions, or values in infoboxes... where its associated style may break the layout.
However the CSS classname homonym to the language code is useful for browers that can't use lang() selectors for styling appropriate fonts for that language (notably with South-East Asian scripts).
So: remove xml:lang="" and description, and replace span by bdi. Thanks. verdy_p (talk) 23:22, 20 April 2015 (UTC)