Pergunta

I wonder how can I make mediawiki parse markup tags in different languages? e.g I need to enable french language and give users ability to write [[Catégorie:Something]] instead of [[Categorie:Something]] or if enable russian be able to write [[Категория:Something]]

I have changed language in LocalSettings like this:

$wgLanguageCode = "fr";
$wgContLang = "fr";

and run rebuildall.php but nothing changes.

Foi útil?

Solução

You want to extend the namespace aliases array:

$wgNamespaceAliases['Catégori'] = NS_CATEGORY;
$wgNamespaceAliases['Категория'] = NS_CATEGORY;

However, this is only needed when you want to make additional aliases for a few namespaces. By default, the namespace names are localized already, so that (next to the canonical English names) the namespaces are named according to your $wgLanguageCode setting. As @leo mentioned, this might need a cache clearing to become effective.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top