I have just installed translate (latest snapshot in MW 1.20.02) and it works fine but I cannot activate machine translation. I got an API key from Apertium and another one form Microsoft (domain verified too). I have put this in LocalSettings.php:
include_once("$IP/extensions/Translate/Translate.php");
$wgGroupPermissions['translator']['translate'] = true;
$wgGroupPermissions['sysop']['translate'] = true;
$wgTranslateDocumentationLanguageCode = false;
# Add these too if you want to enable page translation
$wgGroupPermissions['sysop']['pagetranslation'] = true;
$wgEnablePageTranslation = true;
$wgTranslateTranslationServices = array();
$wgTranslateTranslationServices['TTMServer'] = array(
'database' => false, // Passed to wfGetDB
'cutoff' => 0.75,
'type' => 'ttmserver',
'public' => false,
);
$wgTranslateTranslationServices['Microsoft'] = array(
'url' => 'http://api.microsofttranslator.com/V2/Http.svc/Translate',
'key' => null,
'timeout' => 3,
'type' => 'microsoft',
);
$wgTranslateTranslationServices['Apertium'] = array(
'url' => 'http://api.apertium.org/json/translate',
'pairs' => 'http://api.apertium.org/json/listPairs',
'key' => null,
'timeout' => 3,
'type' => 'apertium',
'codemap' => array( 'no' => 'nb' ),
);
$wgTranslateTranslationServices['translatewiki'] = array(
'url' => 'http://translatewiki.net/w/api.php',
'viewurl' => 'http://translatewiki.net/wiki/',
'displayname' => 'translatewiki.net',
'cutoff' => 0.75,
'timeout-sync' => 4,
'timeout-async' => 4,
'type' => 'ttmserver',
'class' => 'RemoteTTMServer',
);
# Private api keys for machine translation services
$wgTranslateTranslationServices['Apertium']['key'] = 'XXXXXXXXXXXXXXXX';
$wgTranslateTranslationServices['Microsoft']['key'] = 'XXXXXXXXXXXXXXXXXXXXXX';
1. The only thing that seems to work is TTMServer. I got a couple of suggestions alright. But not Apertium or Microsoft. What is wrong?
2. I also don't know if the "translatewiki" service section is properly set up or if it's even about this at all. The way I understand it by the documentation, I thought I could get suggestions from translatewiki.net's database. Is it like this and if it is what is the proper syntax?
3. In the extension's homepage it is mentioned that it also works with Google translation service. How can I implement Google too?