/** * to benefit of [[:Template:Multilingual_description]] or [[:Template:MLD]] template * you need to load this javascript into your monobook.js * by putting in it * * importScript('MediaWiki:Multilingual description.js'); * * * Implements language selection for multilingual elements * * In certain environments, it's not feasible to neatly box away each * different language into its own section of the site. By marking elements * multilingual, you can emulate this behavior by only displaying the * message in the user's language. This reduced the "Tower of Babel" effect. * * @author Edward Z. Yang (Ambush Commander) * @version $Id: language_select.js 1358 2007-02-19 15:34:59Z Edward $ * Changes performed since: * - Transformed the form to have only one button with a text that alternates. * - Fixed multiples forms being loaded if several multilingual div were in the page. * - Multiples linguistic templates eg: {{en|text1...}} {{en|text2...}} are taken into account correctly. * - The inline bug is fixed. See http://commons.wikimedia.org/w/index.php?title=Commons:Help_desk&diff=next&oldid=18063001#Adding_language-specific_captions_to_images for the description of the issue. */ // logging facitily function appendErro(str){ // throw new Error("DEBUG: "+str) } // disable it when putting in production function log(str) { //setTimeout("appendErro('"+str+"')", 1) } var log_inc=0; function loginc(str) { log_inc = log_inc +1; log(log_inc + ' ' + str); } function logresetinc() { log_inc=0; } function getElemInfo(elem) { res = elem.nodeName + ' ' + elem.lang + " " ; for (var i=0; i