DEPRECATED in API Version 2.8.1. Replaced by the more generic function library_literals_get ()
Function prototype
library_form_get_literals (session, form , lang)
API Version
2.7.26 and higher
Supported interfaces
SOAP, REST
Description
Returns a list of the literals used in this FORM TEMPLATE in the desired language
Returns a list of the literals used in this FORM TEMPLATE, including the literals of its ITEM TEMPLATES.
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
form : reference of the FORM TEMPLATE
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 FORM TEMPLATE:
ref : reference of the FORM TEMPLATE
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_form_set_literals() 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_form_get_literals ( “LCAAAAAAAAAAAA”, 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