The translationString mixin is responsible for retrieving and updating
specific translation strings from a given resource and target language.
- Source:
Methods
(inner) translationString(project_slug, resource_slug, language_code, source_string)
Retrieve a specifiv translation along with its details 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_string |
string | The source string |
- Source:
Example
txApi.translationStringRead('autotest', 'resourcetest', 'en')
(inner) translationStrings(project_slug, resource_slug, language_code)
Retrieve a list of all 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.translationStrings('autotest', 'resourcetest', 'en')
(inner) translationStringUpdate(project_slug, resource_slug, language_code, source_string, form)
Update a specific 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_string |
string | The source string |
form |
object | An object containing the updated translation |
- Source:
Example
txApi.translationStringRead('autotest', 'resourcetest', 'en')