localization/translation/resources/get/1

 

Returns list of all resources and their translation/localization status.

Call

https://www.islonline.com/api/islonline-localization/1-0/islonline-localization.php?method=localization/translation/resources/get/1

Parameters

token [string] (required)
    authentication token can be acquired by logging in via API sso/login/1 method
uid [string] (required)
    user id can be acquired by logging in via API sso/login/1 method
partner_code [string] (required)
    partner code provided to you by ISL Online
language_code [string] (required)
    ISO 639-1 language code; this defines localization language
offset [integer]
    offset 100 means that results will be shown from 100th result on
limit [integer]
    how many results are shown in response; maximum number is 100
sort [key-value pair array]
    defines how results should be sorted;
    first value should be field name, second should be sort direction;
    if multiple sort fields are passed, they will be parsed in order in which they reside in array (FIFO)
    Supported fields:
        resource_id
        program_name
        context
        translatable_strings
        untranslated_strings
        word_count
    Supported directions:
        ASC - for ascending
        DESC - for descending
filter [key-value pair array]
    defines how results should be filtered;
    first value should be field name, second should be field value;
    if multiple fields are passed AND logical operator will be put between them
    Supported fields:
        module_name [string] - executes case insensitive left and right search (SL will match also ISLOnline)
        program_name [string] - executes case insensitive left and right search (SL will match also ISLOnline)
        context [string] - executes case insensitive left and right search (SL will match also ISLOnline)
        plugin_name [string] - executes case insensitive left and right search (SL will match also ISLOnline)
        translation_version [string] - executes exact search (1.1 will not match 1.1.3, but only 1.1, also 1.1A will not match 1.1a)
        translated [boolean] - if translated is set to true only resources fully translated will be shown

Return Values

JSON data object
    resources - array of resources available for translation
        resource_id: id of resource
        module_name: to which module translation refers
        program_name: to which program translation refers
        context: to which context translation is related
        plugin_name: to which plugin translation refers
        translation_version: translation version
        translatable_strings: number of strings that can be translated
        untranslated_strings: number of untranslated strings
        word_count: number of words that can be translated

EXAMPLE 1:

PARAMETERS
    response encoding: JSON
    uid: ::user@example.com::main
    token: secret
    partner_code: partner-code
    language_code: es
    offset: 6
    limit: 3
POST
    https://www.islonline.com/api/islonline-localization/1-0/islonline-localization.php?method=localization/translation/resources/get/1&he=JSON1
    POST: uid=::user@example.com::main, token=secret, partner_code=partner-code, language_code=es, offset=6, limit=3
JSON POST
   https://www.islonline.com/api/islonline-localization/1-0/islonline-localization.php?method=localization/translation/resources/get/1&he=JSON1
   POST: json={ "uid" : "::user@example.com::main", "token" : "secret", "partner_code" : "partner-code", "language_code" : "es", "offset" : "6", "limit" : "3" }


EXAMPLE 2:

Note: When using sort or filter parameters, JSON GET or JSON POST method must be used! 

PARAMETERS
   response encoding: JSON
   uid: ::user@example.com::main
   token: secret
   partner_code: partner-code
   language_code: es
   offset: 6
   limit: 3
   sort: resource_id=ASC
   filter: program_name=light, translated=false, translation_version=1
JSON POST
   https://www.islonline.com/api/islonline-localization/1-0/islonline-localization.php?method=localization/translation/resources/get/1&he=JSON1
   POST: json={ "uid" : "::user@example.com::main", "token" : "secret", "partner_code" : "partner-code", "language_code" : "es", "offset" : "6", "limit" : "3", "sort" : { "resource_id" : "ASC" }, "filter" : { "program_name" : "light", "translated" : "false", "translation_version" : "1" } }

Was this article helpful?