Set Language

Verb: setCulture

Defines a new language on the IBM RPA Studio's execution context. Every command with an optional culture parameter will use this defined language by default.

Syntax

setCulture --culture(Culture)

Inputs

Script Designer Required AcceptedTypes Description
--culture Language Required Culture Language that is set as the default in subsequent commands. The available language options are:
  • de-DE
  • en-US
  • es-ES
  • ko-KR
  • pt-BR
  • pt-PT
  • zh-CN
  • zh-TW
  • Example

    Example 1: In this example, we use the Convert Number to Text command to convert the number 512 into a "SimpleMoney" format, which varies depending on the language defined in the execution context. Then, we set the language to "Spanish (Spain)", using the Set Language command. The number 512 is again converted into "SimpleMoney" format, but now with a different language formatting.

    defVar --name currencyText --type String
    // Converts the number 512 into "SimpleMoney" format based on the language of the current execution context
    convertNumberToText --number 512 --conversiontype "SimpleMoney" currencyText=value
    logMessage --message "Currency in the default system language: ${currencyText} (for en-US)" --type "Info"
    // Sets the context language to "Spanish (Spain)"
    setCulture --culture es-ES
    // Converts the number 512 into the "SimpleMoney" format, but now using Spanish
    convertNumberToText --number 512 --conversiontype "SimpleMoney" currencyText=value
    logMessage --message "Currency in Spanish (Spain): ${currencyText}" --type "Info"
    // This example has the following result:
    // Currency in the default system language: $512.00 (for en-US)
    // Currency in Spanish (Spain): €512,00
    
    The output varies depending on the IBM RPA Studio's current language. Therefore, if necessary, change the language defined in the Set Language.