Help:Extension:Translate/sco



The Translate extension enhances MediaWiki wi essential featurs needit tae dae the owersetin wairk. It can be uised tae owerset the content pages, the interface o the wiki n even ither saffware products, aes it's uised at translatewiki.net. The Owersetin extension comes wi aen easie tae uise owersetin interface n can separate the content structur fae the tex content that needs tae be owerset, shawin yinlie the owersetable tex til the owerseters bi splittin the content intil manageable units. Ilka unit is autæmateeclie trackit fer chynges, n owerseters immediatelie see whit needs updatin oan ae speceefeec page or throochoot the wiki.

The Translate extension is used to translate the user interface of MediaWiki and other software projects at translatewiki.net by hundreds of translators every month. At userbase.kde.org it is used to translate almost a thousand content pages with user documentation. It is easy to start using the Translate extension, but at the same time it also scales up and provides advanced reporting, reviewing and workflow features.

Featurs


Interface: The main featur o the the owerset extension is ae simple yet functional owersetin interface. Forby the necessar information lik message defineetion n documentation, ye can see owersets in ither leids aes weel. Gif ae definition haes chynged, ye'll see the chynges. The extension comes wi some biggit-in chacks, that can help wi the common mistaks lik onbalancet brackets n onuised variables. Dependin oan the confeeguration, forby thaur's suggestions fae the owersetin myndin n machine owersetin services lik thae o Google Translate, Microsoft's Bing Translator n Apertium.

The uissabeelitie o the owersetin interface is enhanced wi the JavaScript n AJAX. The backend provides the WebAPIs that can be uised in mobile interfaces or interfaces tailerit til speceefic kynds o content. Forby, it's possible to export messages fer owersetin in ither aff-line n oan-line tuils that accept the Gettext po file format.

Message groops n tasks: Monie o the featurs ar biggit roond twa baseec concepts: message groops n tasks.

Ae message groop represents ae collection o messages. The ae content page wid be yin message groop, whaur, in the simplest form, ilka paragraph wid be yin message in that groop. Messages uised in ilka MediaWiki extension form ae message groop oan translatewiki.net – ae few o the mucklest extensions hae monie groops. Forby, ye can mak ae groop o groops, lik All newsletters or All Translate extension messages. Monie o the stateestics n the tasks wairk oan the message groop basis.

The tasks, or in ither words differant leetins o messages in ae message groop, faceelitate differant uiss cases. Fer ordinair aen owerseter gets ae leet o aw onowerset messages in ae chosen message groop, bit thaur's tasks whaur ye can luikower messages or jist get ae leet o aw messages, owerset or na.



Reportin n stateestics: The extension haes extenseeve reportin featurs rangin fae ae view o onowerset messages across aw o the message groops in ae gien leid til leets o owerseters per lie wi thair acteevitie level.

Content owersetin: Gif ye'v ever ettelt tae owerset content in MediaWiki wioot onie tuils, ye ken it disna scale. The owerset versions get oot o date n thaur's nae waa tae track the chynges til the maister page, sae thaur's monie hauf-owerset n ootdatit oewrsets wioot ae clear luikower o the oweraw status. Owerseters aften feel dauntit whan thay canna wairk wi manageable wee peeces o tex. owerseters dinna fynd whit tae wairk oan or whit needs tae be updatit. Forby, the uisers get confuised bi ootdatit information.

This is all solved with the Translate extension and its page translation feature. It adds a bit of overhead to the pages that need translation, but the benefits far outweigh this. Essentially you only need to mark the parts of the page that need translation. The extension then splits such parts into paragraph sized units and creates a message group for them. After that translators can use all the features described above. In addition you can easily add a language bar with the tag or have links automatically go to the user's preferred language version (only) when it exists, by using links of the form Special:MyLanguage/Pagename.

For more information see the tutorial How to set up a content page for translation and the in-depth documentation of the page translation feature.

Developers: The extension comes with built-in support for many common translation file formats, like Java properties and Gettext po files. It has an extensive set of tools, both in-wiki and on the command line, to efficiently import and export translations.

Use cases
You can translate almost anything with the Translate extension. Naturally there are specialized tools for translation of certain kind of content like video subtitles, that are better done with those tools, but in general Translate performs very well with any kind of text that can be split into messages with length ranging from one word up to one large paragraph. Longer messages become unwieldy to translate and are just harder to work with.

The three primary use cases that the Translate extension supports are content translation, local interface translation and software translation. All of them are covered in the following sections, with links to tutorials and to reference documentation or in-depth topical help where available. Of the three use cases the interface translation has been utilized the least.

Content translation


Most wikis have content they would like to be available in multiple languages. Whether just a few or hundreds of pages, it doesn't matter. In order to prevent wasting translator's time, pages should be marked for translation only when they are reasonably stable. Each change that is made afterwards can affect tens or hundreds of old translations, and the time needed to update them adds up. Especially with volunteer translators, you should be aware of this aspect, and respect the time they spend making translations and updates, avoiding unnecessary work. If you use the Translate extension to translate pages, you are already well on your way to using the translator time available in the most effective and efficient way.

The way the Translate extension splits up a page into paragraph sized units does not leave too much freedom for translators to change the content. This is usually a good thing and is ideal where continuity and consistency of content across languages is desired. It can be worked around, but in principle this way of doing translations is not generally suitable, for example, for Wikipedia articles, which usually are totally independent of each other. Even if they originally start as a translation from a different language, they usually begin living their own independent life from the original version. With Translate, the original page is always the main version, and new content cannot be developed in translated versions.

With these limitations in mind there are still plenty of cases where this feature is a perfect match. Most, if not all, user documentation falls into this category as well as news-like content that does not change once written. If you have the Translate extension already installed and access rights configured, try creating a page and wrapping the whole text inside  and follow the links, or follow the tutorial How to prepare a page for translation.

Local interface translation in multilingual wikis
One thing almost every wiki has customized is the sidebar. It is possible to create a message group for the custom sidebar messages and also for other local interface customisations.

One interesting expansion is the multilingual pages or templates built with the magic word. The translatewiki.net main page and some Wikimedia Commons templates are good examples of this. The magic word is an alternative to the content translation feature and it is more suitable to mark-up heavy pages just like the translatewiki.net main page. Another nice feature is that the language of the page automatically follows the user interface language, so there is no need for a language bar, although you might want to have an interface language selector instead.

Setting this up is currently a bit more complicated than content translation and needs software configuration, but it is all covered in the tutorial How to make an interface message group.

Software translation
The Translate extension is a good fit for translating software interface messages. At translatewiki.net, it is used to translate tens of software products from games to web applications. The Translate extension supports reading and updating translations from and to common formats used in web development including Java properties, Gettext and Yaml files.

Change tracking is also available for externally tracked files, because internally the extension uses a cached derivative version of the localisation files where the source text and its translations are stored, instead of using them directly in their original format. Translation administrators can either use the web interface or a command line interface to check new message definitions and "fuzzy" (request update of) translations when they need updating. This works regardless of the underlying file format or version control system (if any).

With simple command line tools, translation administrators can easily import even a large set of existing translations and with just one command they can export all translations in the correct format and in the correct directory structure. You can export directly to your VCS repository checkout, where you can easily commit changes and new files.

For translators and translation administrators

 * How to translate [Tutorial]
 * Translation best practices
 * Statistics and reporting
 * Quality assurance
 * Message group states
 * Off-line translation
 * [In progress] Glossary

For translation administrators

 * How to prepare a page for translation [Tutorial]
 * Page translation administration
 * Interface message groups (localised sidebar, main page and templates) [Tutorial]
 * [In progress] Message group management
 * YAML configuration format
 * How to write YAML configuration for file based message groups [Tutorial]

Reference documents for developers

 * Installation and Configuration; MediaWiki Language Extension Bundle should be enough in most cases.
 * [In progress] Translate explained for developers
 * Hooks
 * [In progress] Message groups
 * [In progress] File format support
 * Translation aids
 * [Unwritten] Web API
 * Insertables
 * Translation memories

Related

 * Translation notifications
 * Localisation/Tutorial: General localisation tutorial for developers, for use at hackathons & trainings
 * Extension:TranslateSvg: Adds support for translating SVG files
 * Universal Language Selector: Provides webfonts and input methods

Todo

 * Implementation on Meta: m:Meta:Translate extension.
 * See translate-doc for specific tasks.