வார்ப்புரு:BCP47
{{#switch:{{lc:{{{1|}}}}}
 &lt;!-- pseudo codes --&gt;
 ||root|default|i-default=&lt;!-- empty language tag means unknown per the HTML spec --&gt;&lt;!-- or ={{int:lang}}? (the best user default), or =en? (the default &quot;ContentLanguage&quot; for unlocalized data on Meta) --&gt;
 
 &lt;!-- current BCP47 violations by Wikimedia sites, which can be fixed using standard tags when they exist --&gt;
 |als=gsw
 |bat-smg=sgs
 |de-formal=de&lt;!-- could be &quot;de-x-formal&quot;, but actually a subset within standard &quot;de&quot; for HTML/XML --&gt;
 |eml=egl&lt;!-- retired code, the de facto eml.wikipedia uses Emilian, not Romagnol --&gt;
 |fiu-vro=vro
 |mo=ro-cyrl&lt;!-- retired, best fit on Wikimedia sites, but no longer working in interwikis (Wikipedia project deleted) --&gt;
 |nl-informal=nl&lt;!-- could be &quot;nl-x-informal&quot;, but actually a subset within standard &quot;nl&quot; for HTML/XML --&gt;
 |nrm=nrf&lt;!-- Wikimedia sites uses &quot;nrm&quot; to mean Norman, but standard &quot;nrm&quot; is an unrelated language. The &quot;nrf&quot; code is now standardized for Norman (previously used a private-use extension of French &quot;fr-x-nrm&quot;) --&gt;
 |roa-rup=rup
 |simple=en&lt;!-- could be &quot;en-simple&quot; but actually a subset within standard &quot;en&quot; for HTML --&gt;
 |sr-ec=sr-cyrl
 |sr-el=sr-latn
 |zh-classical=lzh
 
 &lt;!-- other current BCP47 violations by Wikimedia sites, fixed using private-use extensions (if they are needed, labels are limited to 8 letters/digits) --&gt;
 |cbk-zam=cbk-x-zam
 |map-bms=jv-x-bms
 |roa-tara=it-x-tara
 |tokipona|tp=x-tokipona
 
 &lt;!-- conforming BCP47 &quot;private-use&quot; extensions used by Wikimedia, which are no longer needed, and improved using now standard codes --&gt;
 |be-x-old=be-tarask
 
 &lt;!-- conforming but ambiguous BCP47 codes used by Wikimedia in a more restrictive way, with more precision --&gt;
 |arc=syc&lt;!-- The de-facto arc.wikipedia.org, as per their community request, is in actual using Syriac which is coded as syc --&gt;
 |no=nb&lt;!-- &quot;no&quot; means Bokmål on Wikimedia sites, &quot;nb&quot; is not used --&gt;
 |bh=bho&lt;!-- &quot;bh&quot;=&quot;bih&quot; is a language family, interpreted in Wikimedia as the single language &quot;bho&quot;, even if its interwiki code remains bh) --&gt;
 |tgl=tl-tglg&lt;!-- &quot;tgl&quot; on Wikimedia is the historic variant of the Tagalog macrolanguage (&quot;tl&quot; or &quot;tgl&quot;, &quot;tl&quot; recommended for BCP47), written in the Baybayin script (&quot;tglg&quot;) --&gt;
 
 &lt;!-- conforming BCP47 &quot;inherited&quot; tags, strongly discouraged and replaced by their recommended tags (complete list that should not be augmented now) --&gt;
 |art-lojban=jbo&lt;!-- still used in some old Wikimedia templates --&gt;
 |en-gb-oed=en-gb&lt;!-- no preferred replacement, could be &quot;en-gb-x-oed&quot; but actually a subset within standard &quot;en-gb&quot; --&gt;
 |i-ami=ami
 |i-bnn=bnn
 |i-hak=hak
 |i-klingon=tlh
 |i-lux=lb
 |i-navajo=nv
 |i-pwn=pwn
 |i-tao=tao
 |i-tay=tay
 |i-tsu=tstu
 |no-bok=nb&lt;!-- still used in some old Wikimedia templates --&gt;
 |no-nyn=nn&lt;!-- still used in some old Wikimedia templates --&gt;
 |sgn-be-fr=sfb
 |sgn-be-nl=vgt
 |sgn-ch-de=sgg
 |zh-guoyu=cmn&lt;!-- this could be an alias of &quot;zh&quot; on Wikimedia sites, which do not use &quot;cmn&quot; but assume &quot;zh&quot; is Mandarin --&gt;
 |zh-hakka=hak
 |zh-min=zh-tw&lt;!-- no preferred replacement, could be &quot;zh-x-min&quot;, but actually a subset within standard &quot;zh-tw&quot;; not necessarily &quot;nan&quot; --&gt;
 |zh-min-nan=nan&lt;!-- used in some old Wikimedia templates and in interwikis --&gt;
 |zh-xiang=hsn
 
 &lt;!-- conforming BCP47 &quot;redundant&quot; tags, discouraged and replaced by their recommended tags (complete list that should not be augmented now) --&gt;
 |sgn-br=bzs
 |sgn-co=csn
 |sgn-de=gsg
 |sgn-dk=dsl
 |sgn-es=ssp
 |sgn-fr=fsl&lt;!-- still used in some old Wikimedia templates --&gt;
 |sgn-gb=bfi
 |sgn-gr=gss
 |sgn-ie=isg
 |sgn-it=ise
 |sgn-jp=jsl
 |sgn-mx=mfs
 |sgn-ni=ncs
 |sgn-nl=dse
 |sgn-no=nsl
 |sgn-pt=psr
 |sgn-se=swl
 |sgn-us=ase&lt;!-- still used in some old Wikimedia templates --&gt;
 |sgn-za=sfs
 |zh-cmn=cmn&lt;!-- still used in some old Wikimedia templates, this could be an alias of &quot;zh&quot; on Wikimedia sites, which do not use &quot;cmn&quot; but assume &quot;zh&quot; is Mandarin --&gt;
 |zh-cmn-Hans=cmn-hans&lt;!-- still used in some old Wikimedia templates, this could be an alias of &quot;zh-hans&quot; on Wikimedia sites, which do not use &quot;cmn&quot; but assume &quot;zh&quot; is Mandarin --&gt;
 |zh-cmn-Hant=cmn-hant&lt;!-- still used in some old Wikimedia templates, this could be an alias of &quot;zh-hant&quot; on Wikimedia sites, which do not use &quot;cmn&quot; but assume &quot;zh&quot; is Mandarin --&gt;
 |zh-gan=gan&lt;!-- still used in some old Wikimedia templates --&gt;
 |zh-wuu=wuu&lt;!-- still used in some old Wikimedia templates --&gt;
 |zh-yue=yue&lt;!-- still used in some old Wikimedia templates and in interwikis --&gt;
 
 &lt;!-- other &quot;inherited&quot; tags of the standard, strongly discouraged as they are deleted, but with no defined replacement there are left unaffected (complete list that should not be augmented now)--&gt;
 |cel-gaulish=xtg&lt;!--ambiguous, most often &quot;xtg&quot; for Transalpine Gaulish in today's France, may also be &quot;xcg&quot; for Cisalpine Gaulish in today's Northern Italy--&gt;
 |i-enochian=x-enochian?
 |i-mingo=x-mingo?
 
 &lt;!-- other standard &quot;redundant&quot; tags, which were unnecessarily registered (they validate with standard subtags) and that are left unaffected (complete list that should not be augmented now)
 |az-arab
 |az-cyrl
 |az-latn
 |be-latn
 |bs-cyrl
 |bs-latn
 |de-1901
 |de-1996
 |de-at-1901
 |de-at-1996
 |de-ch-1901
 |de-ch-1996
 |de-de-1901
 |de-de-1996
 |en-boont
 |en-scouse
 |iu-cans
 |iu-latn
 |mn-cyrl
 |mn-mong
 |sl-nedis
 |sl-rozaj
 |sr-cyrl
 |sr-latn
 |tg-arab
 |tg-cyrl
 |uz-cyrl
 |uz-latn
 |yi-latn
 |zh-hans
 |zh-hans-cn
 |zh-hans-hk
 |zh-hans-mo
 |zh-hans-sg
 |zh-hans-tw
 |zh-hant
 |zh-hant-cn
 |zh-hant-hk
 |zh-hant-mo
 |zh-hant-sg
 |zh-hant-tw
   --- standard special codes
 |mul
 |und
   --- all other unaffected tags:
   Minimal check of validity (valid BCP47 codes are necessarily stable over URLENCODE and #titleparts).
   The check ensures that the code contains only ASCII letters, digits or hyphens, and starts by a letter.
   This check is necessary to avoid a severe bug in MediaWiki, with some values of parameter 1, notably with
   urlencoded characters (including quotes, braces, ampersands...), slashes, or any HTML or wiki formatting
   (see also [[Template:CURRENTCONTENTLANGUAGE]]). If successful, force result to lowercase; otherwise
   return an empty language tag.
   --&gt;
 |#default =
   {{#ifeq: {{#titleparts:{{{1|}}}|1}} | {{#titleparts:{{{1|}}}||-1}}
   | {{#ifeq: {{lc:{{#titleparts:{{{1|}}}|1}}}} | {{ucfirst:{{lc:{{#titleparts:{{{1|}}}|1}}}}}}
     |
     | {{#ifeq: {{{1|}}} | {{urlencode:{{{1|}}}}}
       | {{lc:{{{1|}}}}}
       }}
     }}
   }}