Difference between revisions of "GetDictionary"
Jump to navigation
Jump to search
Line 12: | Line 12: | ||
|ParamType=int | |ParamType=int | ||
|ParamRequired=required | |ParamRequired=required | ||
− | |ParamDescription= | + | |ParamDescription=The device type code (see #DeviceTypeCodes enumeration to know the list of device types allowed) |
}} | }} | ||
{{Api_Parameter| | {{Api_Parameter| | ||
Line 18: | Line 18: | ||
|ParamType=String | |ParamType=String | ||
|ParamRequired=required | |ParamRequired=required | ||
− | |ParamDescription= | + | |ParamDescription=Responsible of defining the language to retrieve the dictionary for. The parameter is a String and represents the universal notation pattern to represent that. ISO-639-2 code para el language and ISO 3166-1 alpha-2 for the country. |
}} | }} | ||
{{Api_Parameter| | {{Api_Parameter| | ||
Line 24: | Line 24: | ||
|ParamType=String | |ParamType=String | ||
|ParamRequired=required | |ParamRequired=required | ||
− | |ParamDescription= | + | |ParamDescription=Identifies the component registered in the platform. It’s a unique id to define what dictionary is requested. e.g. gvp.api, gvp.web, gvp.android |
}} | }} | ||
Latest revision as of 17:42, 9 June 2014
Description
Get the complete dictionary for a component based on the chosen language. The dictionary is the translation for all words used in each component. Each words (key) is replicated in each language available on the environment as specified in the MIB config file.
The translation of the files is made by MIB Tools and it has a configurable cache to be reflex in the UNIAPI.
Parameters
- deviceType (int, required)
- The device type code (see #DeviceTypeCodes enumeration to know the list of device types allowed)
- languageCode (String, required)
- Responsible of defining the language to retrieve the dictionary for. The parameter is a String and represents the universal notation pattern to represent that. ISO-639-2 code para el language and ISO 3166-1 alpha-2 for the country.
- component (String, required)
- Identifies the component registered in the platform. It’s a unique id to define what dictionary is requested. e.g. gvp.api, gvp.web, gvp.android
Returns
Returns a JSON object containing objects with whole dictionary grouped by section in pair key/value.
Example:
{
- "StatusCode": 0,
- "Severity": 1,
- "StatusMessage": "OK",
- "Content":
- {
- "alert": {
- "buttonclose": "Fechar",
- "cancel": "Cancelar",
- "ok": "OK"
- }
- "alert": {
- }
- {
}
Exceptions
- MissingRequiredParameterException with value: "Language Code is mandatory!".
- MissingRequiredParameterException with value: "Component is mandatory!".
- InvalidComponentException
Caching
This method cached. The cache is configured in the MIB config files (MibDictionariesComponents).
Known issues
None
Version history
API Version Number | Change description | Changes author |
---|---|---|
2.3 | Initial method design | Pablo Antolin and Julio Vasconcelos |