Use the get operation in the following cases:
A request XML packet retrieving info on LP's includes the get operation node:
<packet version="1.5.0.0">
<locale>
<get>
</get>
</locale>
</packet>
The get node is presented by type LocaleGetInput (locale.xsd
), and its graphical representation is as follows:
locale.xsd
).
The get node of the output XML packet is presented by type LocaleGetOutput (locale.xsd
) and structured as follows:
locale.xsd
).locale.xsd
). If the info node is present in the response packet, the following nodes are required:Remarks
In API RPC v.1.5.0.0, the result node also contains the message node.
The following request packet retrieves info on US English LP:
<packet>
<locale>
<get>
<filter>
<id>en-US</id>
</filter>
</get>
</locale>
</packet>
Response:
<packet>
<locale>
<get>
<result>
<status>ok</status>
<info>
<id>en-US</id>
<lang>ENGLISH</lang>
<country>United States</country>
<used>17</used>
<enabled>true</enabled>
</info>
</result>
</get>
</locale>
</packet>
If the LP was not found, the response from the server looks as follows:
<packet>
<locale>
<get>
<result>
<status>error</status>
<errcode>1013</errcode>
<errtext>Locale does not exist</errtext>
<filter-id>en-US</filter-id>
<id>en-US</id>
</result>
</get>
</locale>
</packet>
The following request packet retrieves info on US English and Russian LP's:
<packet>
<locale>
<get>
<filter>
<id>en-US</id>
<id>ru-RU</id>
</filter>
</get>
</locale>
</packet>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
<locale>
<get>
<result>
<status>ok</status>
<info>
<id>en-US</id>
<lang>ENGLISH</lang>
<country>United States</country>
<used>4</used>
<enabled>true</enabled>
</info>
</result>
<result>
<status>ok</status>
<info>
<id>ru-RU</id>
<lang>RUSSIAN</lang>
<country>Russian Federation</country>
<used>0</used>
<enabled>true</enabled>
</info>
</result>
</get>
</locale>
</packet>