Cisco Unity Connection Provisioning Interface (CUPI) API -- Language Map
From DocWiki
m (1 revision) |
Latest revision as of 00:05, 14 December 2010
Links to Other API pages: Cisco_Unity_Connection_APIs
| CUPI Guide Contents |
| API Overview Index of All CUPI Documentation |
Contents |
About Language Map
This page contains information on how to use the API to display the language map, which contains mappings between language codes and languages. This is a list of languages available for install on a Cisco Unity Connection server; to view the list of languages actually installed on a server, use this GET method instead:
GET http://<connection-server>/vmrest/installedlanguages
Note that currently, the API to retrieve the language map and the API to retrieve the installed languages on a server both require System Administrator access.
Listing and Viewing
The following is an example of a GET that lists all language mappings in the language map:
GET http://<connection-server>/vmrest/languagemap
The following is an excerpt of the response from the above GET request:
200
OK
<?xml version="1.0" encoding="UTF-8"?>
<LanguageMappings total="149">
<LanguageMapping>
<LanguageCode>1025</LanguageCode>
<LanguageAbbreviation>ARA</LanguageAbbreviation>
<LanguageTag>ar-SA</LanguageTag>
</LanguageMapping>
<LanguageMapping>
<LanguageCode>1026</LanguageCode>
<LanguageAbbreviation>BGR</LanguageAbbreviation>
<LanguageTag>bg-BG</LanguageTag>
</LanguageMapping>
<LanguageMapping>
<LanguageCode>1027</LanguageCode>
<LanguageAbbreviation>CAT</LanguageAbbreviation>
<LanguageTag>ca-ES</LanguageTag>
</LanguageMapping>
.
.
.
</LanguageMappings>
You can also use the query parameters rowsPerPage and pageNumber to limit the number of returned results. For example:
GET http://<connection-server>/vmrest/languagemap?rowsPerPage=2&pageNumber=3
This request returns the two languages on the third page, as follows:
200
OK
<?xml version="1.0" encoding="UTF-8"?>
<LanguageMappings total="149">
<LanguageMapping>
<LanguageCode>1029</LanguageCode>
<LanguageAbbreviation>CSY</LanguageAbbreviation>
<LanguageTag>cs-CZ</LanguageTag>
</LanguageMapping>
<LanguageMapping>
<LanguageCode>1030</LanguageCode>
<LanguageAbbreviation>DAN</LanguageAbbreviation>
<LanguageTag>da-DK</LanguageTag>
</LanguageMapping>
</LanguageMappings>
To view the language mapping for a specific language, you can use either the language code or the language abbreviation. For example, to find out what language the language code 1041 corresponds to, use:
GET http://<connection-server>/vmrest/languagemap/1041
The following is the response from the above GET request:
200 OK <?xml version="1.0" encoding="UTF-8"?> <LanguageMapping> <LanguageCode>1041</LanguageCode> <LanguageAbbreviation>JPN</LanguageAbbreviation> <LanguageTag>ja-JP</LanguageTag> </LanguageMapping>
Similarly, you can use the language abbreviation to find the corresponding language code. For example, to find the language code for US English (abbreviated ENU), use:
GET http://<connection-server>/vmrest/languagemap/ENU
This GET request yields the following response, which indicates that 1033 is the language code for US English:
200 OK <?xml version="1.0" encoding="UTF-8"?> <LanguageMapping> <LanguageCode>1033</LanguageCode> <LanguageAbbreviation>ENU</LanguageAbbreviation> <LanguageTag>en-US</LanguageTag> </LanguageMapping>
Miscellaneous
For a list of supported languages and the corresponding language codes/abbreviations, see the section "Numeric and Alphabetic Codes for Supported Languages in Cisco Unity Connection" in the System Requirements for Cisco Unity Connection Release 8.x.