GithubHelp home page GithubHelp logo

nischayn22 / mediawiki-extensions-livetranslate Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 434 KB

Github mirror of MediaWiki extension LiveTranslate - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

Home Page: https://gerrit.wikimedia.org

License: Other

PHP 68.25% JavaScript 31.75%

mediawiki-extensions-livetranslate's Introduction

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".

mediawiki-extensions-livetranslate's People

Contributors

jeroendedauw avatar translatewiki avatar reedy avatar nischayn22 avatar yaronkoren avatar siebrand avatar shirayuki avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.