Customizing the Web Widget V2 (Deprecated)
Note
|
|---|
|
This version of the Translator Widget is now deprecated and will not be supported. You can now upgrade to the new Translator Widget and enjoy the new experience while maintaining all your data! Upgrade here! |
Certain components of the Microsoft Translator Widget can be manually edited to support customizations. Below is the list of the string parameters for customization.
Customization of the Web Widget
Sample Widget Snippet
The parameters listed below for Customization can be inserted after the string starting with "/ajax/v2/widget.aspx..." in your Widget snippet.
<div id="MicrosoftTranslatorWidget"...<noscript><a href="...bv.aspx?a=...">Translate this page</a>...</div> <script type="text/javascript">/* <![CDATA[ */ ... s.type = "text/javascript"; ... + "/ajax/v2/widget.aspx?mode=manual&from=en&layout=ts"; … </script>
|
String Parameter |
Description |
|---|---|
|
from |
Source language of the page. |
|
mode |
Translation “behavior” of the widget, default is manual however the user can always override the behavior which persists for the browser session.
|
|
widget |
Whether or not to display the widget control, default is to display it.
|
|
toolbar |
Display mode for the toolbar, default is inject.
|
|
loc |
Override the UI locale, default is according to the client’s browser accept-language setting. We accept any .NET supported language and fallback to English if it is something we do not localize to. |
|
showLanguages |
Comma delimited list of additional languages to show. For instance: "/ajax/v2/widget.aspx?mode=manual&from=en&showlanguages=fr,de,it"We accept any valid .NET language however unless the API accepts it the page will not get translated. Note that it is possible to add languages whose names we do not localize in which case the language name will always appear in English. |
|
hideLanguages |
Comma delimited list of languages to hide. For instance: "/ajax/v2/widget.aspx?mode=manual&from=en&hidelanguages=fr,de,it" |
|
defaultLanguage |
Language code to override the default target language. |
|
ctfLanguages |
Comma delimited list of languages to enable for CTF. Allows you to limit feedback to certain languages. For non-CTF widget snippets, this parameter has no effect. |
|
showDashboard |
When set to either "false" or "no" the dashboard link is not shown in the CTF tooltip. |
|
category |
Use this value as the category field for all API calls. "/ajax/v2/widget.aspx?mode=manual&from=en&layout=ts&category=<category ID>” |
While it does not impact the widget snippet there is also a feature that triggers translation on any page hosting the widget by appending “#mstto=(target language)” to the page URL. Here’s an example: "http://blogs.msdn.com/b/translation/#mstto=ko".
Note