These is the install file for the Live Translate extension.
Extension page on mediawiki.org: http://www.mediawiki.org/wiki/Extension:Live_Translate
Latest version of the install file: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/LiveTranslate/INSTALL?view=co
== Installation ==
Once you have downloaded the code, place the ''LiveTranslate'' directory within your MediaWiki 'extensions' directory.
Then add the following code to your [[Manual:LocalSettings.php|LocalSettings.php]] file:
# Live Translate
require_once( "$IP/extensions/LiveTranslate/LiveTranslate.php" );
After this you need to run MediaWikis update script which can be found at /maintenance/update.php.
You also need to run this when upgrading to version 0.4 or above from any older version.
After doing this, you have installed the extension. To be able to use it in a meaningful way, you also need to take care of some configuration:
== Configuration ==
Configuration of Live Translate is done by adding simple PHP statements to your [[Manual:LocalSettings.php|LocalSettings.php]]
file. These statements need to be placed AFTER the inclusion of Live Translate. The options are listed below and their default
is set in the [http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/LiveTranslate/LiveTranslate_Settings.php?view=markup Live Translate settings file].
You should NOT modify the settings file, but can have a look at it to get an idea of how to use the settings, in case the below descriptions do not suffice.
=== Available languages ===
You have to specify which languages users should be able to translate to. This is done by adding language codes to $egLiveTranslateLanguages.
By default it contains only your wikis main language (as specified by $wgLanguageCode in [[LocalSettings.php]]). You add languages as follows:
$egLiveTranslateLanguages[] = 'nl';
$egLiveTranslateLanguages[] = 'de';
If there are no languages available other then the current language of the page, then the translation control will not show up.
=== Translation service ===
As of Live Translate 1.1, you can make use of either the Google Translate or Micorosft Translation services.
You can specify the service with the following setting:
# Translation service to use.
$egLiveTranslateService = LTS_GOOGLE;
Available values are LTS_GOOGLE and LTS_MS. The default is LTS_GOOGLE.
==== Google API key ====
To be able to use the Google Translate service, you need to [https://code.google.com/apis/console get an API key] and
add it to your [[LocalSettings.php]] file AFTER the inclusion of the extension.
# Google API key
$egGoogleApiKey = 'INSERT-YOUR-KEY-HERE';
==== Microsoft App ID ====
To be able to use the Microsoft Translation service, you need to [http://www.bing.com/developers/createapp.aspx get an App Id] and
add it to your [[LocalSettings.php]] file AFTER the inclusion of the extension.
# Microsoft App ID
$egLiveTranslateMSAppId = 'INSERT-YOUR-ID-HERE';
=== Permissions ===
In order to edit the list of translation memories, you need the 'managetms' [[Permissions|permission]]. By default only sysops have this permission.
$wgGroupPermissions['sysop']['managetms'] = true;