Internationalization API

These endpoints allow to retrieve available languages and translations.

Method Endpoint

GET

/cxf/bpc-core/i18n/languages

Description

Get the languages used by the translations.

Query Parameter

only_keys

true to get only the keys, false to get a more detailed list. Default is false.

currentLanguage

the current language used to determine the language names. Default is en.

Returns

The languages as JSON. Example response when only_keys=false and currentLanguage=de

[
    {
        "nativeName": "Deutsch",
        "name": "Deutsch",
        "id": "de"
    },
    {
        "nativeName": "English",
        "name": "Englisch",
        "id": "en"
    },
    {
        "nativeName": "français",
        "name": "Französisch",
        "id": "fr"
    }
]

Example response when only_keys=true

[
    "de", "en", "fr"
]

HTTP Status Code

  • 200 : OK

Content-Type

  • application/json

Required Access Rights

Can be used without a user session.

GET

/cxf/bpc-core/i18n/languages/all

Description

Get all supported languages.

Query Parameter

only_keys

true to get only the keys, false to get a more detailed list. Default is false.

currentLanguage

the current language used to determine the language names. Default is en.

Returns

The languages as JSON. Example response when only_keys=false and currentLanguage=de

[
    {
        "nativeName": "Deutsch",
        "name": "Deutsch",
        "id": "de"
    },
    {
        "nativeName": "English",
        "name": "Englisch",
        "id": "en"
    },
    ...
]

Example response when only_keys=true

[
    "de", "en", ...
]

HTTP Status Code

  • 200 : OK

Content-Type

  • application/json

Required Access Rights

Can be used without a user session.

/cxf/bpc-core/i18n/translations

Description

Forces a re-load of the translations.

Returns

HTTP Status Code

  • 200 : OK

Required Access Rights

The logged in user or API Key must have either the following role or right.

  • Role : TRANSLATIONS_ADMIN

  • Right : TRANSLATIONS_RELOAD

GET

/cxf/bpc-core/i18n/translations/{lang}

Description

Get all translations for a specific language. This is a collection of the translations found in all modules/bundles and the ones from our custom translations setting Core_CustomTranslations. In case a module/bundle does not provide translations in the requested language the translations for the default language set by the setting 'Core_TranslationsFallbackLanguage' gets used.

Path Parameter

lang

the language to get the translations for. Like 'de', 'en', 'fr' etc.

Query Parameter

ict

true to ignore the translation from the custom translations setting, false to include them. Default is false.

fallback

true to return entries in the default language as fallback when a translation key is missing in the requested language, false to return only the entries that exist in the requested language. Default is true.

Returns

JSON object with the translations. The keys are sorted in ascending order.

HTTP Status Code

  • 200 : OK

  • 404 : Language not found

Content-Type

  • application/json

Required Access Rights

Can be used without a user session.

GET

/cxf/bpc-core/i18n/language/{lang}/valid

Description

Checks if the provided language is known to the backend. Returns the default/fallback language if not.

Path Parameter

lang

the language to do the check for

Returns

The given language when valid, otherwise the default language.

Example response

{
  "language": "en"
}

HTTP Status Code

  • 200 : OK

Content-Type

  • application/json

Required Access Rights

Can be used without a user session.