WikiTranslation

From Synfig Studio :: Documentation
Revision as of 16:19, 5 January 2008 by Zelgadis (Talk | contribs) (Wiki translation scheme proposal)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Languages Language: 

English • Deutsch • español • français • português


Concept

One of possible solutions is to use the extension ParserFunctions to create a customizable template based on the existence or not of some pages.

The page will be created in the main language of the wiki (English), translated pages bear the name of the main page by adding the language code preceded by a /, e.g. for About, page in Russian will be About/ru.

Maybe better use '.' sign instead of '/'? Not sure...

I see a lot of advantages in such approach, such as:

  • Titles are in one language, which is good for referencing and keeping wiki documentation in order.
  • It also provides a clear mapping between original and translated pages.
  • It is easy to implement.

Configuration

You need two files from [here]:

  • Expr.php
  • ParserFunctions.php

Download them, create directory 'ParserFunctions' in your 'extensions' directory and place there downloaded files.

I not sure if those files compatible with this version of MediaWiki?

Then add in LocalSettings.php:

require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );

All we have to do once the extension added to create the template Languages, for example:

<div style="vertical-align: middle;">
----
<span style="font-size:smaller">
Reference:
'''[[{{{1}}}|English]]''' – 
Translations:  
{{
#ifexist: {{{1}}}/de | <span lang="de">[[{{{1}}}/de|Deutsch]]</span>  •  
}}{{
#ifexist: {{{1}}}/es | <span lang="es">[[{{{1}}}/es|Español]]</span>  •  
}}{{
#ifexist: {{{1}}}/fi | <span lang="fi">[[{{{1}}}/fi|Suomi]]</span>  •  
}}{{
#ifexist: {{{1}}}/en | <span lang="en">[[{{{1}}}/fr|Français]]</span>  •  
}}{{
#ifexist: {{{1}}}/it | <span lang="it">[[{{{1}}}/it|Italiano]]</span>  •  
}}{{
#ifexist: {{{1}}}/he | <span lang="he">[[{{{1}}}/he|עברית]]</span>  •  
}}{{
#ifexist: {{{1}}}/ja | <span lang="ja">[[{{{1}}}/ja|日本語]]</span>  •  
}}{{
#ifexist: {{{1}}}/ko | <span lang="ko">[[{{{1}}}/ko|한국어]]</span>  •  
}}{{
#ifexist: {{{1}}}/no | <span lang="no">[[{{{1}}}/no|Norsk nynorsk]]</span>  •  
}}{{
#ifexist: {{{1}}}/pl | <span lang="pl">[[{{{1}}}/pl|Polski]]</span>  •  
}}{{
#ifexist: {{{1}}}/pt | <span lang="pt">[[{{{1}}}/pt|Português]]</span>  •  
}}{{
#ifexist: {{{1}}}/ru | <span lang="ru">[[{{{1}}}/ru|Русский]]</span>  •  
}}{{
#ifexist: {{{1}}}/sq | <span lang="sq">[[{{{1}}}/sq|Shqip]]</span>  •  
}}{{
#ifexist: {{{1}}}/zh | <span lang="zh">[[{{{1}}}/zh|中文]]</span>  •  
}}</span>
----
</div>

Use

For each page, you can add managing multi-language using the tag:

{{Languages|About}}

Where 'About' is the name of the page.

Then you can create the page translated into naming them appropriately depending on the language chosen

About/ru

Alternatives

Sources


Languages Language: 

English • Deutsch • español • français • português