Extension:Translate
From MediaWiki.org
|
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 |
||
| 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:
- MediaWiki MessagesXx.php (including .po export/import)
- MediaWiki extensions (~300)
Commonist (see commons:Category:Commonist)- FreeCol
- FUDforum
- MantisBT
- Mobile Wikipedia
- mwlib.rl (see Extension:PDF_Writer, and http://code.pediapress.com/wiki/wiki/mwlibrl)
- NOCC (webmail client)
- OpenLayers
- Omegawiki vocabulary trainer
- Wikiblame
Contents |
[edit] Installation
- This extension requires all MediaWiki extensions (that are to be translated) present in the extension folder.
- In addition, $wgCacheDirectory must be set to some path where yout webserver has write access. The default value FALSE is not permitted.
- 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');
- Which other language translations are displayed to help translator. For example
$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
- Follow Installation Instructions
- You will have a new Special Page titled "Translate"
- Users have to be a member of user group 'Translators' to enable full functionality.
[edit] Additional functionality and tools
- Language code set in
$wgTranslateDocumentationLanguageCodeis 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
- Production site for MediaWiki, MediaWiki extensions, FreeCol, MantisBT, and more at translatewiki.net
- See Extension talk:Translate and translatewiki:Support for Known Issues and Errors