Méthode | Description | |
---|---|---|
GetBingAuthToken ( string clientId = null, string clientSecret = null ) : string |
Retrieves an oAuth authentication token to be used on the translate API request. The result string needs to be passed as a bearer token to the translate API. You can find client ID and Secret (or register a new one) at: https://datamarket.azure.com/developer/applications/
|
|
TranslateBing ( string text, string fromCulture, string toCulture, string accessToken = null ) : string |
Uses the Bing API service to perform translation Bing can translate up to 1000 characters. Requires that you provide a CLientId and ClientSecret or set the configuration values for these two. More info on setup: http://weblog.west-wind.com/posts/2013/Jun/06/Setting-up-and-using-Bing-Translate-API-Service-for-Machine-Translation
|
|
TranslateGoogle ( string text, string fromCulture, string toCulture, string googleApiKey = null ) : string |
Translates a string into another language using Google's translate API JSON calls.
|
|
TranslateGoogleApi ( string text, string fromCulture, string toCulture, string googleApiKey = null ) : string |
Translates a string into another language using Google's translate API JSON calls.
|
public GetBingAuthToken ( string clientId = null, string clientSecret = null ) : string | ||
clientId | string | The client ID of your application |
clientSecret | string | The client secret or password |
Résultat | string |
public TranslateBing ( string text, string fromCulture, string toCulture, string accessToken = null ) : string | ||
text | string | Text to translate |
fromCulture | string | Two letter culture name |
toCulture | string | Two letter culture name |
accessToken | string | Pass an access token retrieved with GetBingAuthToken. /// If not passed the default keys from .config file are used if any |
Résultat | string |
public TranslateGoogle ( string text, string fromCulture, string toCulture, string googleApiKey = null ) : string | ||
text | string | |
fromCulture | string | |
toCulture | string | |
googleApiKey | string | Google Api key - if not specified it's read from the configuration |
Résultat | string |
public TranslateGoogleApi ( string text, string fromCulture, string toCulture, string googleApiKey = null ) : string | ||
text | string | |
fromCulture | string | |
toCulture | string | |
googleApiKey | string | Google Api key - if not specified it's read from the configuration |
Résultat | string |