Skip to content
This repository has been archived by the owner on Aug 16, 2018. It is now read-only.

JeroenDeDauw/LiveTranslate

Repository files navigation

These is the readme file for the Live Translate extension.
	
Extension page on mediawiki.org: http://www.mediawiki.org/wiki/Extension:Live_Translate
Latest version of the readme file: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/LiveTranslate/README?view=co

== About ==

Live Translate is a lightweight extension to live translate articles using the Google Translate service.

== Usage ==

Live Translate adds a "Translate" button to the top right-hand corner of wiki pages, together with a dropdown
menu that allows you to select the target language. Hitting the "Translate" button will cause the text in the
wiki page to be translated to the selected destination language within the browser (it will not modify the
original source text in any way). The source language will be assumed to be the wiki's main language, unless
the wiki page's name ends with a "/" and then a language code, e.g., "Main Page/de" - if that is the case, the
wiki page's language will be assumed to be the one that corresponds to that language code.

After a user hits the "Translate" button, another button, "Show original", will appear, which if pressed will
return the display to its original language.

=== Defining a translation dictionary ===

You can define a dictionary of "special words" for which you provide translations, and that will then be left
alone by Google Translate. This dictionary is defined in a page within the wiki; by default the page is named
"Live Translate Dictionary", but this name can be changed in LocalSettings.php. The contents of the page should
be a list in CSV (comma-separated values) format, where the first row contains the set of relevant language codes,
and the successive ones the translations. An example would be:

<pre>
en, nl, de
Hello world, Hallo wereld, Hallo welt
Awesome, Geweldig, Große
</pre>

The dictionary supports defining synonyms. You can add them using the | sign as delimiter. For example, if you
want "fantastic" to be translated the same as "awesome", the above dictionary would change to:

<pre>
en, nl, de
Hello world, Hallo wereld, Hallo welt
Awesome|fantastic, Geweldig, Große
</pre>

This means that "fantastic" will be "handled" exactly the same as "Awesome" when translating from English to
one of the other languages. When translating to English, the first word in the synonym list, in this case
"Awesome", will be used. So translating the Dutch "Geweldig" to English will result in "Awesome".

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published