Function prototype
library_literals_get (session, object_type, ref , lang)
API Version
2.8.1 and higher
Supported interfaces
SOAP, REST
Description
Returns a list of the literals used in a library object in the desired language
Returns a list of the literals used in any of the LIBRARY OBJECTS .
The return value is a list of all the literals in the active language and the corresponding translation to the desired language
Input parameters:
session : is the session token obtained in the session_init() call
object_type : type of library object. Possible options:
ref : reference of the library object
lang : desired language. If no language is provided, the function will only return the list of languages for which at leas a translation exists
Output parameters:
result : List of all the literals used in the library object:
ref : reference of the object
original_language : 2-letter ISO code of the language used as reference for the translations. It will always be the active session language
translate language : 2-letter ISO code of the language for which we want to obtain the literals translated.
languages : List of all languages for which at least a translation exists
literals : list of all the literals. Each element of the list contains:
ref : Reference of the literal. This can be used later in the library_literals_set() function to modify a translation
description : brief explanation of what the literal refers to (e.g. “Form Title”)
literal : literal in the reference language (active session language)
translated : literal in the requested language
ErrorMsg : If any error occurs, then this value contains a description of the error translated to the current language
ErrorCode : If any error occurs, then this value contains any of the standard ERROR CODES
Request example library_literals_get ( “LCAAAAAAAAAAAA”, "FORM", 16384, "ZH")
Reponse The response format is XML when the function has been invoked via the SOAP API, and JSON when it has been invoked via the REST API
Return Error codes
INVALID_TOKEN
The session token provided is not valid
TEMPLATE.NOT_FOUND
The requested FORM TEMPLATE was not found
INSUFFICIENT_PRIVILEGES
The session user does not have the necessary privileges to request the literals of the FORM TEMPLATE