Revision [28225]
This is an old revision of LanguageBars made by darkcity on 2013-07-29 12:08:10.
cn::de::es::fr::gr::hr::it::ja::kr::nl::pl::pt::ru::se::us::vn:: |
HomePage > WikiIndex Wiki Index
Language Bars
Language-bars are a work-in-progress towards making the Wiki multilingual. At the moment it require a fair amount of manual editing to implement. This will hopefully be automated in time.
The language-bars provide a way to switch between different translations of a wikka page. To the reader they appear same on each page (as a string of "language codes"). The language codes are based on url letter codes of a notable country that speaks that language.
Despite looking the same a seperate language-bar page needs to be created for each collection of translations. The language-bar is then included at the top of each translation.
Example if a language bar exists
In this example we will look at making a Greek translation of the English page SoftwareIndex.
1. Clone the page prefixing with the Greek language code 'Gr' ie GrSoftwareIndex
1a. The page should already have {{include tonguesSoftwareIndex}} at the top to include the language-bar
2. Translate the page.
2a. Any internal links are replaced with the Greek equivalent, ie.
[[HomePage]] > [[SoftwareIndex Software Index]]
becomes
[[GrHomePage]] > [[GrSoftwareIndex|Δείκτης Λογισμικό]]
2b. If an equivalent doesn't exist, either leave it pointing to the English equivalent page. Or make it point to a future translation. For example, there is no translation for [[SquashFS]], but a future translation may well be called [[GrSquashFS|SquashFS]].
Example if no language bar exist
In this example, we will create a language-bar for a English page called NewPage.
1. Create a page called tonguesNewPage
2. The page should contain the following code only-
||{background:white}[[CnNewPage|cn]]::[[DeNewPage|de]]::[[EsNewPage|es]]::[[FrNewPage|fr]]::[[GrNewPage|gr]]::[[HuNewPage|hu]]::[[ItNewPage|it]]::[[JaNewPage|ja]]::[[KrNewPage|kr]]::[[nlNewPage|nl]]::[[plNewPage|pl]]::[[PtNewPage|pt]]::[[RuNewPage|ru]]::[[SeNewPage|se]]::[[NewPage|us]]::[[vnNewPage|vn]]::||
3. Include {{include tonguesNewPage}} at the top of NewPage when its written.
There is a tool for generating the code, see Language Bar tool page
Note adding Non-English pages
If adding a Non-English page for which no English equivalent page exists. There is no need to add the appropriate two letter prefix. The future English translation would then be prefixed with 'Us'. For example, the French page Chien is created, the English translation would be called UsChien.
Language Bar Tool
A tool is available to automatically create the 'tongues' page, see Language Bar tool page