Template:Language bar/doc

From Wikimedia UK
Jump to: navigation, search

Usage[edit source]

This template create a bar to automatically link between different versions of the same page in different languages.

{{language bar}}

Assumptions[edit source]

This template assumes that the top-level page will the in English and any non-English versions will be in subpages. It also assumes that the subpages will be named with the ISO 639 code for that language.

For example
Page name Description
Foo English-language rootpage
Foo/cy Welsh-language subpage
Foo/gd Scots Gaelic-language subpage

The links created by the template depend on whether it is used on a rootpage or a subpage. The template will automatically detect the existance of appropriate subpages and provide any links as appropriate.

Subpages as the top-level page[edit source]

In some circumstances, the page with multilingual support will be a subpage.

For example
Page name Description
Foo/Bar English-language subpage
(to be treated as if it were a rootpage)
Foo/Bar/cy Welsh-language subpage
Foo/Bar/gd Scots Gaelic-language subpage

This would normally create a problem as the template would recognise the "top-level" English page as one of the non-English subpages. In order to force the template to treat a subpage as if it were the rootpage, the template should be entered as follows, but only one the top-level page. The template should be entered as normal on all subpages.

{{language bar|root=1}}

Languages supported[edit source]

This template only recognises and supports the following languages. The template will need to be edited in order to support additional languages.

ISO 639 code Language
ang Old English
ar Arabic
bn Bengali
cy Welsh
en English
enm Middle English
ga Gaelic
gd Scots Gaelic
gu Gujarati
gv Manx
kw Cornish
pa Eastern Punjabi
pl Polish
pnb Western Punjabi
sco Scots
ur Urdu