Module: mixins/translation

The translation mixin is responsible for retrieving and updating translation files.
Source:

Methods

(inner) translation(project_slug, resource_slug, language_code)

Retrieve a resource translation for the given language and project
Parameters:
Name Type Description
project_slug string The projects slug
resource_slug string The resource slug
language_code string The target language code
Source:
Example
txApi.translation('autotest', 'resourcetest', 'en')

(inner) translationUpdate(project_slug, resource_slug, language_code, form)

Update a resource translation for the given language and project
Parameters:
Name Type Description
project_slug string The projects slug
resource_slug string The resource slug
language_code string The target language code
form object An object containing the updated translation
Source:
Example
txApi.translationUpdate('autotest', 'resourcetest', 'en', {
  'hello world': 'derp'
})