Closed GoogleCodeExporter closed 9 years ago
You can set the optional "Source" field by changing the .Source property on the
Translations.ListRequest. See below for some example code:
var request = service.Translations.List(translations, "<targetLanguage, e.g.
en>");
request.Source = "<sourceLanguage, e.g. fr>";
response = request.Fetch();
foreach (TranslationsResource translation in response.Translations)
{
Console.WriteLine("translation", translation.TranslatedText);
}
Original comment by mlinder...@gmail.com
on 31 Oct 2011 at 11:48
// the example code:
$client = new apiClient();
$client->setApplicationName ('Google Translate PHP Gavote Application');
$client->setDeveloperKey (GAVOTE_GOOGLE_API_KEY);
$service = new apiTranslateService($client);
// NOW:
$translations = $service->translations->listTranslations('Erde', 'en', array ('source' => 'de')); // last array parameter: source language!
Original comment by ral.die...@gmail.com
on 23 Jan 2012 at 7:08
Original issue reported on code.google.com by
ssog...@gmail.com
on 31 Oct 2011 at 9:46