check_lang
Validate the language.
Description
Checks the language name to make sure that it adheres to the ISO standard.
Parameters
- action
- check_lang
- lang
- The language code to check; i.e en_US, en_BR, etc.
Example URL
http://<host>:<port>/<context>/web/util.xql?action=check_lang&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. The normalized language is in the "message" attribute.
Failed Result
In the case of an error, this function returns a standard API result element with a non-zero statusCode (such as, <result status='FAIL' statusCode='200' message='Localized Failure Message' messageKey='message.key'/>). Refer to API Error Code Reference.