REST API Locale =============== Configuring Locale for REST APIs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To use the REST API in your own language(locale), you must first install the required TSS language pack. The table below gives an example of what languages are available, taken from TSS documentation: .. csv-table:: :header: Language, Locale Value :widths: 50, 25 Brazilian Portuguese, \"pt_BR\" Chinese (Mainland), \"zh_CN\" Chinese (Taiwan), \"zh_TW\" English (US), \"en_US\" French, \"fr\" German, \"de\" Italian, \"it\" Japanese, \"ja\" Korean, \"ko\" Spanish, \"es\" Note: TSS language packs require separate download and installation (see TSS documentation for more information on installing the language packs and to find out what languages are supported). Contact your account representative for details. After installing the language pack, to use the required language you must add/edit the REST API locale configuration setting in 'config.txt' file in your TSS install location as shown below: .. code-block:: text \MBSW\15\etc\config.txt In config.txt, you can add the following key/value pair, if they don't already exist. If they exist then simply set the locale value to your selected language. If the key/value is not set or defined in 'config.txt' then the server will default to "en_us" language setting. i.e. setting the locale to German, set locale value to "de" .. code-block:: text key rest_api { value locale "de" } Get REST API Locale ~~~~~~~~~~~~~~~~~~~ .. http:get:: /api/restapilocale :synopsis: Returns REST API locale setting Returns REST API locale .. code-block:: http GET /api/restapilocale HTTP/1.1 Accept: application/json .. csv-table:: :header: Response Code, Reason :widths: 25, 75 200, No error 500, Server error The response is a JSON object containing the REST API locale: .. code-block:: json { "locale": "de" }