Extension:Translate

From MediaWiki.org

Jump to: navigation, search

                 

Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
Translate

Release status: stable

Implementation  Special page, Locale
Description Enables in-wiki localisation and export of messages.
Author(s)  Niklas Laxström
Last Version  9 (2008-08-04:1) (2008-08-04)
MediaWiki  1.14 alpha or higher
License GPL 2.0 or later
Download Download snapshot

Subversion [Help]
Browse source code

README

Example  Translatewiki.net

check usage (experimental)

Enables in-wiki localisation, proofreading and exporting of messages for MediaWiki, MediaWiki extensions and external programs. Adding new message groups is possible with $wgTranslateAC and class autoloading.

Currently supports:

Contents

[edit] Installation

  1. This extension requires all MediaWiki extensions (that are to be translated) present in the extension folder.
  2. In addition, $wgCacheDirectory must be set to some path where yout webserver has write access. The default value FALSE is not permitted.
  3. Add the following code to your LocalSettings.php (at the bottom)
include("$IP/extensions/Translate/Translate.php");
$wgTranslateEC = array_keys($wgTranslateAC); // All modules
$wgTranslateFuzzyBotName = 'FuzzyBot';
$wgGroupPermissions['translator']['translate'] = true;
$wgTranslateDocumentationLanguageCode = 'qqq';

A more elaborate example of a configuration for Translate can be found on betawiki:Configuration.

[edit] Parameters

The available parameters, with the default value and a description.

  • $wgTranslateExtensionDirectory = "$IP/extensions/";
    Where to look for extension files.
  • $wgTranslateLanguageFallbacks = array();
    Which other language translations are displayed to help translator. For example $wgTranslateLanguageFallbacks['code'] = array('code');
  • $wgTranslateFuzzyBotName = 'FuzzyBot';
    Name of the fuzzer bot.
  • $wgTranslateGroupStructure
     ?
  • $wgTranslateAddMWExtensionGroups
     ?
  • $wgTranslateEC = array();
    EC = Enabled classes.
  • $wgTranslateCssLocation = $wgScriptPath . '/extensions/Translate';
    Web address to the directory which contains the css file. If set to false, css is inserted inline.
  • $wgTranslateDocumentationLanguageCode = false;
    Enables the use of message documentation in edit view. Value should be a language code of which translations are considered as documentation instead.
  • $wgTranslateMessageNamespaces = array( NS_MEDIAWIKI );
    The namespaces in which the Translate extension works.

[edit] Usage

  1. Follow Installation Instructions
  2. You will have a new Special Page titled "Translate"
  3. Users have to be a member of user group 'Translators' to enable full functionality.

[edit] Additional functionality and tools

  • Language code set in $wgTranslateDocumentationLanguageCode is used for message documentation
  • CreateMessageIndex.php is used to update the message index. It should be run always when messages are added, removed or renamed.
  • export.php is used for bulk export (currently only MediaWiki messages are supported)
  • fuzzy.php is used to tag changed messages that need updating
  • groupStatistics.php is used to for advanced reporting (example)
  • poimport.php is used to import a returned .po file
  • wikimedia-mostused.txt contains a list of the most used messages in Wikimedia wikis (see Most often used messages in Wikimedia)

[edit] Unsupported extensions in SVN

Please help get these extensions a more standard implementation of i18n so they can be supported in translatewiki.net.

  • Extension:Cite (partial support; no support for messages in cite_text, i18n messages in cite_text-xx)
  • Extension:WikiHiero (all message in wh_language.php; appears to be very complex and specialised)

[edit] More info