Extension:MultiLanguageManager

From mediawiki.org
This page is a translated version of the page Extension:MultiLanguageManager and the translation is 71% complete.
MediaWiki 拡張機能マニュアル
MultiLanguageManager
リリースの状態: 保守されていない
実装 データベース , ロケール
説明 Add multi-languages capacities to a wiki
作者 Marc Despland, Robert Vogel
最新バージョン 2.0 (2017-08-31)
MediaWiki 1.29
データベースの変更 はい
Composer mediawiki/multi-language-manager
ライセンス GNU 一般公衆利用許諾書 2.0
ダウンロード

  • $mgAvailableLanguage
  • $mgLanguagePermisionsKey
language
Quarterly downloads 11 (Ranked 133rd)
translatewiki.net で翻訳を利用できる場合は、MultiLanguageManager 拡張機能の翻訳にご協力ください

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. If that is desired, use the PerPageLanguage extension.

インストール

  • ダウンロードして、ファイルをextensions/フォルダー内のMultiLanguageManagerという名前のディレクトリ内に配置します。
    開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MultiLanguageManager
  • 以下のコードを LocalSettings.php ファイルの末尾に追加します:
    wfLoadExtension( 'MultiLanguageManager' );
    
  • 更新スクリプトを実行します。このスクリプトは、この拡張機能が必要とするデータベーステーブルを自動的に作成します。
  • Yes 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

設定

Available languages

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

$mgAvailableLanguages = array(
   'en',
   'fr'
);

利用者権限

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;

関連項目