Template:LangSwitch: Difference between revisions

m
simpler with bdo (flow content model) rather than choosing between span and div (too restricted content models); needed for strict HTML conformance; also use strict BCP47 lang attribute
m (changing defaut from div to span for cases with fallbacks applied (there's NO div or span otherwise))
m (simpler with bdo (flow content model) rather than choosing between span and div (too restricted content models); needed for strict HTML conformance; also use strict BCP47 lang attribute)
Line 1:
{{#ifeq:{{{{{{uselang|}}}|}}}|{{{{{{uselang|}}} |-}}}|{{{{{{uselang|}}}}}}|
<{{#if:{{{div|}}}|div|span}}bdo lang="{{BCP47|{{uselang}}}}" dir="{{dir|{{uselang}}}}">{{#switch:{{#if:{{{uselang|}}}|{{{uselang|}}}|{{uselang}}}}<!--
TODO:add the missing fallbacks port these fallbacks into the Lua module for TNT and use the fallbacks mapped in the PHP modules of MediaWiki supported languages
 
Line 283:
-->|#default=
{{#if:{{{default|}}}|{{#ifeq:{{{{{{default|}}}|}}}|{{{{{{default|}}}|-}}}|{{{{{{default|}}}|}}}|{{{en}}}}}|{{{en}}}}}
}}</{{#if:{{{div|}}}|div|span}}bdo>}}<noinclude><!--{{Documentation}}[[Category:formatting templates]][[Category:User interface language dependent templates|LangSwitch]]--></noinclude>
Anonymous user