I18nResource Resource

Resource to translate given keys (optionally including parameters)

GET /i18n/t/{key}

Translate the given key and optional parameters (variant with key given in the path)

Request Parameters
name type description multivalued
key path translation key no
p query optional parameters yes
Response Body
media type data type description
text/plain (custom) translated string

Example

Request
GET /i18n/t/{key}
Accept: text/plain

              
Response
HTTP/1.1 200 OK
Content-Type: text/plain

                
...
                
              

GET /i18n/t

Translate the given key and optional parameters (variant with key given as query parameter)

Request Parameters
name type description multivalued
k query translation key no
p query optional parameters yes
Response Body
media type data type description
text/plain (custom) translated string

Example

Request
GET /i18n/t
Accept: text/plain

              
Response
HTTP/1.1 200 OK
Content-Type: text/plain

                
...
                
              

POST /i18n/set

Set the current session language

Request Body
media type data type description
application/json SetLanguageRequest (JSON) request to set the current session language
Response Body
media type data type description
application/json GenericResponse (JSON) response
application/xml (custom)

Example

Request
POST /i18n/set
Content-Type: application/json
Accept: application/json

                
{
  "code" : "..."
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "messages" : [ {
    "fieldName" : "...",
    "message" : "...",
    "type" : "SUCCESS",
    "timestamp" : 12345,
    "image" : "...",
    "sender" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "id" : 12345
  }, {
    "fieldName" : "...",
    "message" : "...",
    "type" : "CRITICAL",
    "timestamp" : 12345,
    "image" : "...",
    "sender" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "id" : 12345
  } ],
  "responseInfo" : {
    "responseCode" : "AUTHREQUIRED",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /i18n/get

Get the current session language

Response Body
media type data type description
application/json LanguageResponse (JSON) session language
application/xml (custom)

Example

Request
GET /i18n/get
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "code" : "...",
  "messages" : [ {
    "fieldName" : "...",
    "message" : "...",
    "type" : "WARNING",
    "timestamp" : 12345,
    "image" : "...",
    "sender" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "id" : 12345
  }, {
    "fieldName" : "...",
    "message" : "...",
    "type" : "NEUTRAL",
    "timestamp" : 12345,
    "image" : "...",
    "sender" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "id" : 12345
  } ],
  "responseInfo" : {
    "responseCode" : "NOTLICENSED",
    "responseMessage" : "...",
    "property" : "..."
  }
}