Extension:MultiLanguageManager

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
MultiLanguageManager

Release status:Extension status stable

ImplementationTemplate:Extension#type Database, Locale
DescriptionTemplate:Extension#description Add multi-languages capacities to a wiki
Author(s)Template:Extension#username Marc Despland, Robert Vogel
Latest versionTemplate:Extension#version 2.0 (2017-08-31)
MediaWikiTemplate:Extension#mediawiki 1.29
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GNU General Public License 2.0
Download
ParametersTemplate:Extension#parameters
  • $mgAvailableLanguage
  • $mgLanguagePermisionsKey
Added rightsTemplate:Extension#rights

language

Translate the MultiLanguageManager extension if it is available at translatewiki.net

Check usage and version matrix.

The MultiLanguageManager extension allows you to add multi-languages capacities to a wiki:

  • You can define a list of available languages
  • You can define a page to be a variant of another page within the same wiki
  • On a page with variants a special navigation will be displayed ("flags") that allow to switch between those pages
  • The interface language for anonymous users will automatically be changed to match the language of the page

ATTENTION: This extension does not use the built-in Page content language mechanism of MediaWiki.

Installation[edit]

  • Download and place the file(s) in a directory called MultiLanguageManager in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'MultiLanguageManager' );
    
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration[edit]

Available languages[edit]

The configuration is done using the $mgAvailableLanguage variable which contains the code of language and the code of its name in the file MultiLanguageManager_setup.php.

$mgAvailableLanguage = array(
   'en' => 'multilanguagemanager_en',
   'fr' => 'multilanguagemanager_fr'
);

The users rights[edit]

You can manage who has the rights to modify the linguistic parameters of the pages. You can set those users rights to match with an existing right using the $mgLanguagePermisionsKey variable . For example to set the linguistic rights to match the edition article rights:

$mgLanguagePermisionsKey = 'edit';

But you could also choose an other rights : language :

$mgLanguagePermisionsKey = 'language';

Then think of set the rights according to the groups:

$wgGroupPermissions['*'][$mgLanguagePermisionsKey] = false;
$wgGroupPermissions['user'][$mgLanguagePermisionsKey] = true;
$wgGroupPermissions['sysop'][$mgLanguagePermisionsKey] = true;