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

NameTypeDescription

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"
    },
    {
        "id": 13,
        "language_code": "cs",
        "language": "Čeština"
    },
    {
        "id": 14,
        "language_code": "hr",
        "language": "Hrvatski"
    },
    {
        "id": 15,
        "language_code": "hu",
        "language": "Magyar"
    },
    {
        "id": 16,
        "language_code": "bg",
        "language": "български"
    },
    {
        "id": 17,
        "language_code": "ro",
        "language": "Limba română"
    },
    {
        "id": 18,
        "language_code": "sk",
        "language": "Slovenský jazyk"
    },
    {
        "id": 19,
        "language_code": "sl",
        "language": "Slovenski jezik"
    },
    {
        "id": 20,
        "language_code": "ca",
        "language": "Català"
    },
    {
        "id": 21,
        "language_code": "et",
        "language": "Eesti keel"
    },
    {
        "id": 22,
        "language_code": "lt",
        "language": "Lietuvių kalba"
    },
    {
        "id": 23,
        "language_code": "lv",
        "language": "Latviešu valoda"
    },
    {
        "id": 24,
        "language_code": "is",
        "language": "Islenska"
    },
    {
        "id": 25,
        "language_code": "el",
        "language": "Δημοτική"
    },
    {
        "id": 26,
        "language_code": "tr",
        "language": "Türkçe"
    },
    {
        "id": 27,
        "language_code": "en-AU",
        "language": "English (Australia)"
    },
    {
        "id": 28,
        "language_code": "en-CA",
        "language": "English (Canada)"
    },
    {
        "id": 29,
        "language_code": "en-US",
        "language": "English (United States)"
    },
    {
        "id": 30,
        "language_code": "en-GB",
        "language": "English (United Kingdom)"
    },
    {
        "id": 31,
        "language_code": "en-IE",
        "language": "English (Ireland)"
    },
    {
        "id": 32,
        "language_code": "en-NZ",
        "language": "English (New Zealand)"
    },
    {
        "id": 33,
        "language_code": "fr-CA",
        "language": "Français (Canada)"
    },
    {
        "id": 34,
        "language_code": "fr-BE",
        "language": "Français (Belgique)"
    },
    {
        "id": 35,
        "language_code": "fr-FR",
        "language": "Français (France)"
    },
    {
        "id": 36,
        "language_code": "fr-CH",
        "language": "Français (Suisse)"
    },
    {
        "id": 37,
        "language_code": "fr-LU",
        "language": "Français (Luxembourg)"
    },
    {
        "id": 38,
        "language_code": "es-MX",
        "language": "Español (Mexico)"
    },
    {
        "id": 39,
        "language_code": "es-ES",
        "language": "Español (España)"
    },
    {
        "id": 40,
        "language_code": "nl-BE",
        "language": "Nederlands (België)"
    },
    {
        "id": 41,
        "language_code": "nl-NL",
        "language": "Nederlands (Nederland)"
    }
]

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

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

addCategoryTranslation

parameters*

JSON

check Operation parameters

{
    "message": "Category translation was successfully added."
}

Operation parameters

ParameterType/FormatRequiredDescription

category_id

number/integer

yes

Integer identifier of a 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": "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

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

addSubCategoryTranslation

parameters*

JSON

check Operation parameters

{
    "message": "Sub category translation was successfully changed."
}

Operation parameters

ParameterType/FormatRequiredDescription

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

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

addSuperIndicatorTranslation

parameters*

JSON

check Operation parameters

{
    "message": "Super indicator translation was successfully added."
}

Operation parameters

ParameterType/FormatRequiredDescription

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

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

addIndicatorTranslation

parameters*

JSON

check Operation parameters

{
    "message": "Indicator translation was successfully added."
}

Operation parameters

ParameterType/FormatRequiredDescription

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

NameTypeDescription

solution*

string

BWS.ESG.Credits

operation*

string

addUnitTranslation

parameters*

JSON

check Operation parameters

{
    "message": "Unit translation was successfully changed."
}

Operation parameters

ParameterType/FormatRequiredDescription

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