setLanguages
Synopsis
void setLanguages(SessionId sessionId, string[] languages)
throws BasketServiceFault;
See also: SessionId, BasketServiceFault
This operation sets the language list of the basket service (the product data languages) to the specified, possibly empty list of ISO 639 alpha-2 language codes. It then augments1 this list with the language of the current locale to build an effective list of product data languages. The effective list of product data languages is updated after each invocation of the session service’s setLocale operation to reflect possible changes to the locale language.
Natural language texts are returned in the first language from the list of effective product data languages supported by the package containing the product database for the article in question. The set of supported languages is defined by the value of the DSR key languages. In case the package does not support any of the listed languages then the Online Configurator returns the text in the first supported language.
Instead of a session ID the operation can also be invoked with a session context ID as their first argument (see also §newSessionContext). If so, the session ID stored in the session context will be used as the actual session ID. The languages will be changed for the whole session including all projects loaded in the session.
A BasketServiceFault is returned if any of the following conditions occurs:
-
The
sessionIdparameter is not a valid string representation of an UUID or does not represent an open session. -
The
languagesparameter contains an invalid language code2.