set_lang
Set the active language
Description
Based on the type of language configuration item, set the active language on the current session.
Parameters
- action
- set_lang
- context
- The language context. This is either "app.lang" or "data.lang"
- lang
- The language to set. If the language is empty, default to the app config value.
Example URL
http://<host>:<port>/<context>/web/session.xql?action=set_lang&context=<value>&lang=<value>
Successful Result
This function returns a standard API result element (<result status='SUCCESS' statusCode='0' message='Localized Message' messageKey='message.key'/>). A statusCode of 0 indicates a successful execution. Any other statusCode indicates a failure.
Failed Result
Accessing this API feature requires the "Use application" permission, and the function will throw a permission exception if the permission is not available.