[[PageOutline(3-4, Sections)]] == !GetTranslation == === Intro === get a translation for given program and language ---- === Description === '''struct !GetTranslation(string $token, string $iso639, string $format, string $program )''' Returns base64-encoded translation strings for program ''program'' and language ''$iso639'' in format ''$format''. This function is used to provide multi-language support for client applications in a single environment. The language translation strings are stored on the server which provides user interface to edit/update them. Updated strings can then be downloaded to client application using this method. ---- === Parameters === ''token (required)'':: token string identifying user's session, taken from [wiki:XmlRpcLogIn LogIn] output structure. ''iso639'' (required):: language [http://www.loc.gov/standards/iso639-2/php/code_list.php ISO639-1] 2-letter code ''format'':: available formats: * gnugettext compatible: mo, po * additional: txt, xml ''program'' (required):: * name of the program/client application you want translations for. * currently supported values: ''subdownloader'', ''oscar'' ---- === Return Values === Output is returned in this structure: {{{ struct( (string) [status], (string) [data], (double) [seconds] ) }}} and contains these elements: ''status'':: function result code, see [wiki:XmlRpcStatusCode list of status codes] ''data'':: base64-encoded language file contents ''seconds'':: time taken to execute this command on server ---- === Implementations === There are currently no available sample implementations. ---- === Changelog === Version 1: created this function ---- === Examples === ==== Input ==== {{{ #!xml GetTranslation d5pnounn3ea5aja0nn4inqamf2 pb mo oscar }}} ==== Output ==== {{{ #!xml status 200 OK data 3hIEl ... gzipped and base64-encoded language file contents ... yZwA= seconds 3.824 }}} ---- === Notes === * you must base-64 decode ''data'' to get the translation strings and then save the contents/file to the desired directory. ---- === See also === * [wiki:XmlRpcGetAvailableTranslations GetAvailableTranslations] ---- === Comments === add your comments, hints and suggestions here if you like ... -------- [wiki:XmlRpcGetAvailableTranslations Prev (GetAvailableTranslations)] [wiki:XmlRpcIntro Home] [Next]