AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 08.11.2013, 15:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
palleagermark: Translate text with Microsoft Translator from AX
Источник: http://www.agermark.com/2013/11/tran...microsoft.html
==============

I recently had a task involving the translation of a few thousand labels. To speed up the translation I figured that I would get a head start if I could somehow automate parts of the process. I found bits and pieces with which I could use the Bing or Microsoft Translator API for the task, and here is how to implement these in AX.

First of all, you need to sign up for the service. You do that from the data market on Windows Azure. You can translate up to 2000000 characters a month for free. Here is a link to sign up for the service: https://datamarket.azure.com/developer/applications/

The bits and pieces I could find for calling the service is .NET code, so I have implemented this part as a C# Project.

Here's the code for that part: http://sdrv.ms/HAOzcW

With the C# Project in place, you can now do translation using this simple code:
// Sign up: https://datamarket.azure.com/developer/applications/
// Translator language codes: http://msdn.microsoft.com/en-us/library/hh456380.aspx
static void EGTranslateSample(Args _args)
{
EGBingTranslation.Translator translator;
System.String clientId = "YourClientId";
System.String clientSecret = "XYZ123";
str translatedTxt;

try
{
translator = new EGBingTranslation.Translator();

// Create an access token
translator.CreateToken(clientId, clientSecret);

// Translate
translatedTxt = translator.Translate("Hvedeøl smager godt", "da", "en");
}

catch (Exception::CLRError)
{
error(AifUtil::getClrErrorMessage());
}
info (translatedTxt);
}
You get your Client Id and Client Secret when you sign up for the service on Azure.

Please note that the Microsoft translation cannot stand alone, unless you think you users are in need of some cheap laughs. You have to have a human to review the translations.

It seems that when you translate between two languages of which neither is English, that the translation is done using English as a "middleman". So for example a Danish to German translation is done first from Danish to English and then from English to German. In that process a lot of context can be lost and the result will not always be correct.

Источник: http://www.agermark.com/2013/11/tran...microsoft.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 8 Blog bot Dynamics CRM: Blogs 1 30.04.2016 10:26
DAX: Official Dynamics AX 2012 R2 Content (update) - Where is it, and how can you find out about updates? Blog bot DAX Blogs 0 03.12.2012 11:11
emeadaxsupport: Preliminary Microsoft Dynamics AX 2012 R2 content now on TechNet and MSDN! Blog bot DAX Blogs 0 10.11.2012 08:20
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 11 Blog bot Dynamics CRM: Blogs 0 06.10.2012 05:27
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 7 Blog bot Dynamics CRM: Blogs 0 27.03.2012 02:11

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 22:07.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.