http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90209
Revision: 90209 Author: jeroendedauw Date: 2011-06-16 15:25:06 +0000 (Thu, 16 Jun 2011) Log Message: ----------- up docs for 1.1 Modified Paths: -------------- trunk/extensions/LiveTranslate/INSTALL trunk/extensions/LiveTranslate/LiveTranslate_Settings.php Modified: trunk/extensions/LiveTranslate/INSTALL =================================================================== --- trunk/extensions/LiveTranslate/INSTALL 2011-06-16 15:15:13 UTC (rev 90208) +++ trunk/extensions/LiveTranslate/INSTALL 2011-06-16 15:25:06 UTC (rev 90209) @@ -24,14 +24,6 @@ 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. -=== Google API key === - -To be able to actually use Google Translate, 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'; - === Available languages === You have to specify which languages users should be able to translate to. This is done by adding language codes to <code>$egLiveTranslateLanguages</code>. @@ -41,3 +33,29 @@ $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'; \ No newline at end of file Modified: trunk/extensions/LiveTranslate/LiveTranslate_Settings.php =================================================================== --- trunk/extensions/LiveTranslate/LiveTranslate_Settings.php 2011-06-16 15:15:13 UTC (rev 90208) +++ trunk/extensions/LiveTranslate/LiveTranslate_Settings.php 2011-06-16 15:25:06 UTC (rev 90209) @@ -18,9 +18,6 @@ die( 'Not an entry point.' ); } -# https://code.google.com/apis/console -$egGoogleApiKey = ''; - # A list of languages that should be available to translate to. $egLiveTranslateLanguages = array( $wgLanguageCode, @@ -66,5 +63,10 @@ # When true, debugging messages will be logged using console.log(). Do not use on production wikis. $egLiveTranslateDebugJS = false; +# Google API key, needed when using the Google Translation service. +# https://code.google.com/apis/console +$egGoogleApiKey = ''; + # Microsoft App Id, needed when using the Microsoft Translation service. +# http://www.bing.com/developers/createapp.aspx $egLiveTranslateMSAppId = ''; _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs