Translations
This section deals with language translations of categories, indicators and units, i.e. making your taxonomy and frameworks multilingual. Translations are removed when taxonomy items are removed.
Returns all registered Languages
POST https://api.bws.ninja/v1/call
Use this operation to list available languages for when you are to register translations for categories, sub-categories, super-indicators, indicators, and units, when building up your taxonomy.
Request Body
solution*
string
BWS.ESG.Credits
operation*
string
getLanguages
[
{
"id": 1,
"language_code": "en",
"language": "English"
},
{
"id": 2,
"language_code": "sv",
"language": "Svenska"
},
{
"id": 3,
"language_code": "dk",
"language": "Dansk"
},
{
"id": 4,
"language_code": "nb",
"language": "Norska"
},
{
"id": 5,
"language_code": "fi",
"language": "Suomalainen"
},
{
"id": 6,
"language_code": "de",
"language": "Deutsch"
},
{
"id": 7,
"language_code": "pl",
"language": "Polskie"
},
{
"id": 8,
"language_code": "fr",
"language": "Français"
},
{
"id": 9,
"language_code": "nl",
"language": "Nederlands"
},
{
"id": 10,
"language_code": "es",
"language": "Español"
},
{
"id": 11,
"language_code": "pt",
"language": "Portoguêse"
},
{
"id": 12,
"language_code": "it",
"language": "Italiano"
}
]{
"message": "More details are needed to retrieve languages."
}Example code
curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "getLanguages"
}Adds a language translation to a category
POST https://api.bws.ninja/v1/call
Use this operation to add or change a language translation to a category for your taxonomy for a particular year.
Request Body
solution*
string
BWS.ESG.Credits
operation*
string
addCategoryTranslation
parameters*
JSON
check Operation parameters
{
"message": "Category translation was successfully added."
}{
"message": "No such category for that reporting year."
}curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "addCategoryTranslation",
"parameters": {
"category_id": 6,
"reporting_year": 2023,
"language_code": "sv",
"translation": "Hållbar förvaltning av naturresurser"
}
}Adds a language translation to a sub category
POST https://api.bws.ninja/v1/call
Use this operation to add or change a language translation to a sub category for your taxonomy for a particular reporting year.
Request Body
solution*
string
BWS.ESG.Credits
operation*
string
addSubCategoryTranslation
parameters*
JSON
check Operation parameters
{
"message": "Sub category translation was successfully changed."
}{
"message": "No sub category translation possible to register for that language code."
}Operation parameters
sub_category_id
number/integer
yes
Integer identifier of a sub category
reporting_year
number, 4 digits
yes
Year of the taxonomy
language_code
string
yes
Language codes as per getLanguages
translation
string
yes
The translated phrase
Example code
curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "addSubCategoryTranslation",
"parameters": {
"sub_category_id": 10,
"reporting_year": 2023,
"language_code": "sv",
"translation": "Hållbart vattenbruk"
}
}Adds a language translation to a super indicator
POST https://api.bws.ninja/v1/call
Use this operation to add or change a language translation to a super indicator for your taxonomy for a particular reporting year.
Request Body
solution*
string
BWS.ESG.Credits
operation*
string
addSuperIndicatorTranslation
parameters*
JSON
check Operation parameters
{
"message": "Super indicator translation was successfully added."
}{
"message": "No super indicator translation possible to register for that reporting year."
}Operation parameters
super_indicator_id
number/integer
yes
Integer identifier of a super indicator
reporting_year
number, 4 digits
yes
Year of the taxonomy
language_code
string
yes
Language codes as per getLanguages
translation
string
yes
The translated phrase
Example code
curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "addSuperIndicatorTranslation",
"parameters": {
"super_indicator_id": 4,
"reporting_year": 2022,
"language_code": "sv",
"translation": "Årligt uttag eller behandling av vatten"
}
}Adds a language translation to an indicator
POST https://api.bws.ninja/v1/call
Use this operation to add or change a language translation to a indicator for your taxonomy for a particular reporting year.
Request Body
solution*
string
BWS.ESG.Credits
operation*
string
addIndicatorTranslation
parameters*
JSON
check Operation parameters
{
"message": "Indicator translation was successfully added."
}{
"message": "No indicator translation possible to register for that language code."
}Operation parameters
indicator_id
number/integer
yes
Integer identifier of an indicator
reporting_year
number, 4 digits
yes
Year of the taxonomy
language_code
string
yes
Language codes as per getLanguages
translation
string
yes
The translated phrase
Example code
curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "addIndicatorTranslation",
"parameters": {
"indicator_id": 4,
"reporting_year": 2022,
"language_code": "sv",
"translation": "Årligt uttag eller behandling av vatten"
}
}Adds a language translation to a unit
POST https://api.bws.ninja/v1/call
Use this operation to add or change a language translation to a unit for your taxonomy for a particular reporting year. In many cases units are identical between languages, but this entry is still needed by the model.
Request Body
solution*
string
BWS.ESG.Credits
operation*
string
addUnitTranslation
parameters*
JSON
check Operation parameters
{
"message": "Unit translation was successfully changed."
}{
"message": "No such unit for that reporting year."
}Operation parameters
unit_id
number/integer
yes
Integer identifier of an indicator
reporting_year
number, 4 digits
yes
Year of the taxonomy
language_code
string
yes
Language codes as per getLanguages
translation
string
yes
The translated phrase
Example code
curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"solution": "BWS.ESG.Credits",
"operation": "addUnitTranslation",
"parameters": {
"unit_id": 4,
"reporting_year": 2022,
"language_code": "sv",
"translation": "m3"
}
}Last updated
Was this helpful?