Template:Language bar/doc: Difference between revisions
AdamBMorgan (talk | contribs) (Additional information) |
AdamBMorgan (talk | contribs) m (typos in tables; use English name for Cornish) |
||
Line 10: | Line 10: | ||
! Page name | ! Page name | ||
! Description | ! Description | ||
|- | |||
| Foo | | Foo | ||
| English-language rootpage | | English-language rootpage | ||
Line 30: | Line 30: | ||
! Page name | ! Page name | ||
! Description | ! Description | ||
|- | |||
| Foo/Bar | | Foo/Bar | ||
| English-language subpage<br /><small>(to be treated as if it were a rootpage)</small> | | English-language subpage<br /><small>(to be treated as if it were a rootpage)</small> | ||
Line 72: | Line 72: | ||
| gv || Manx | | gv || Manx | ||
|- | |- | ||
| kw || | | kw || Cornish | ||
|- | |- | ||
| pa || Eastern Punjabi | | pa || Eastern Punjabi |
Latest revision as of 12:24, 5 June 2013
Usage
This template create a bar to automatically link between different versions of the same page in different languages.
{{language bar}}
Assumptions
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.
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
In some circumstances, the page with multilingual support will be a subpage.
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
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 |