Method: Perfion.Translate( … )
Used for translating values from one language to another language.
Returns the translated value.
Syntax
String Perfion.Translate( object content, string sourceLanguageCode, string targetLanguageCode ) |
Method Parameters
object content | String content value to translate. |
string sourceLanguageCode | ISO 639-1 language code to translate from. |
string targetLanguageCode | ISO 639-1 language code to translate to. |
Example 1
Below example shows how to translate values using the input value as string to translate, and returning a translated value from one language to another.
// before call: Value="apple" Value = Perfion.Translate( Value, "en", "da" ); // after call: Value="æble" |
Example 2
Example of how to use script to set variable – for simple test of script method.