Language Properties REST API

Last Updated: Dec 13, 2022
documentation for the dotCMS Content Management System

Internationalization Resource Messages

Retrieve one or more I18N resource messages from server-configured properties files.

  • endpoint returns I18N message values configured via the language.properties resource bundle stored in /WEB-INF/messages.
  • Does not return values where the key matches a value as well as a parent key. E.g. 'foo.bar=200' and 'foo.bar.baz=99'. Requesting 'foo.bar' will result in a tree. Appropriate warnings are printed in the logs when such a collision is found.
  • Does not perform any message argument processing. The raw value in the properties file is returned unmodified.
  • DOES follow language 'failover' rules. If a key is not defined for the 'de' locale, the message in the default language will be provided.

GET Method:

*   _languageTag_ is defined by the [Java specification for Locale](https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html)
*   Where some/key/value corresponds to a property key 'some.key.value'

#### Single Result

Curl Command:

curl -v -u admin@dotcms.com:admin -X GET http://localhost:8082/api/v1/i18n/de/message/comment/success -H "Content-Type:application/json"

Sample Result:

Parent resource key result

curl -v -u admin@dotcms.com:admin -X GET http://localhost:8082/api/v1/system/i18n/de/message/comment -H "Content-Type:application/json"```

Sample Result:

{
“failure”: “Ihr Kommentar konnte nicht erstellt werden”,
“success”: “Ihr Kommentar wurde gespeichert”,
“delete”: “Ihr Kommentar wurde gelöscht”
}

On this page

×

We Dig Feedback

Selected excerpt:

×