Customizing the Web Widget
The web widget v3 supports customization using certain parameters as shown in the table below. The parameters can be inserted after the string starting with '/ajax/v3/WidgetV3.ashx?siteData= ...' in your Widget snippet.
|
String Parameter |
Description |
|---|---|
|
from |
Source language of the page. |
|
settings |
Translation “behavior” of the widget, default is manual however the user can always override the behavior which persists for the browser session.
|
|
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/v3/widgetv3.ashx?siteData= ... &ctf;=True&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/v3/widgetv3.ashx?siteData= ... &ctf;=True&from=en&hidelanguages=fr,de,it' |
|
defaultLanguage |
Language code to override the default target language. |
|
ui |
Whether or not to show the launcher (true/false). |
|
ctf |
To enable or disable the CTF suggestions feature. 'noanon' prevents anonymous users from making suggestions (true/false/noanon). |
|
languages |
The list of languages to override the default language list. |
|
category |
Use this value as the category field for all API calls. For instance: '/ajax/v3/widgetv3.ashx?siteData= ...&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".