[Mediawiki-l] "in other languages" in LocalSettings.php?

Sumurai8 (DD) sumurai8 at gmail.com
Wed Jun 10 09:25:17 UTC 2009


>
> Say the current article is "Foo", how can I put links to "Foo/es",
> "Foo/fr", etc. in the sidebar? Ideally by editing only LocalSettings.php
>
> We're using MediaWiki to host a user manual which is being translated
> into six languages. Like mediawiki.org, if the main article is "Foo",
> the translated articles are "Foo/es", "Foo/fr", etc.
>
> To help translators, I want to put links to translations of the current
> article in the sidebar (whether the translations exist yet or not)
>

Hi there,

You can do that with interwikilinks. When you have some parserfunctions
installed, you can make a template like this. It automatically adds a
interwiki when translation exists...

{{#ifexist:{{FULLPAGENAME}}/es|[[es:{{FULLPAGENAME}}]]}}
{{#ifexist:{{FULLPAGENAME}}/fr|[[fr:{{FULLPAGENAME}}]]}}

Make interwikilinks like this. Extension below could be helpful when making
interwikithing:

fr   www.yoursite.com/wiki/$1/fr
es    www.yoursite.com/wiki/$1/es

(where www.yoursite.com/wiki/ contains the articles)

This could be helpful:
http://www.mediawiki.org/wiki/Extension:SpecialInterwiki
And parserfunctions:
http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions

Your's faithfully,
D.D. Sumurai8

http://www.kinderwiki.net (we are moving!!!)
http://www.wikikids.nl


More information about the MediaWiki-l mailing list