Resource to translate given keys (optionally including parameters)
Translate the given key and optional parameters (variant with key given in the path)
| name | type | description | multivalued |
|---|---|---|---|
| key | path | translation key | no |
| p | query | optional parameters | yes |
| media type | data type | description |
|---|---|---|
| text/plain | (custom) | translated string |
GET /i18n/t/{key}
Accept: text/plain
HTTP/1.1 200 OK
Content-Type: text/plain
...
Translate the given key and optional parameters (variant with key given as query parameter)
| name | type | description | multivalued |
|---|---|---|---|
| k | query | translation key | no |
| p | query | optional parameters | yes |
| media type | data type | description |
|---|---|---|
| text/plain | (custom) | translated string |
GET /i18n/t
Accept: text/plain
HTTP/1.1 200 OK
Content-Type: text/plain
...
Set the current session language
| media type | data type | description |
|---|---|---|
| application/json | SetLanguageRequest (JSON) | request to set the current session language |
| media type | data type | description |
|---|---|---|
| application/json | GenericResponse (JSON) | response |
| application/xml | (custom) |
POST /i18n/set
Content-Type: application/json
Accept: application/json
{
"code" : "..."
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"messages" : [ {
"fieldName" : "...",
"message" : "...",
"type" : "CRITICAL",
"timestamp" : 12345,
"image" : "...",
"sender" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ { }, { } ],
"login" : "...",
"password" : "..."
},
"id" : 12345
}, {
"fieldName" : "...",
"message" : "...",
"type" : "WARNING",
"timestamp" : 12345,
"image" : "...",
"sender" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ { }, { } ],
"login" : "...",
"password" : "..."
},
"id" : 12345
} ],
"responseInfo" : {
"responseCode" : "PERMISSION",
"responseMessage" : "...",
"property" : "..."
}
}
Get the current session language
| media type | data type | description |
|---|---|---|
| application/json | LanguageResponse (JSON) | session language |
| application/xml | (custom) |
GET /i18n/get
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
{
"code" : "...",
"messages" : [ {
"fieldName" : "...",
"message" : "...",
"type" : "INFO",
"timestamp" : 12345,
"image" : "...",
"sender" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ { }, { } ],
"login" : "...",
"password" : "..."
},
"id" : 12345
}, {
"fieldName" : "...",
"message" : "...",
"type" : "INFO",
"timestamp" : 12345,
"image" : "...",
"sender" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ { }, { } ],
"login" : "...",
"password" : "..."
},
"id" : 12345
} ],
"responseInfo" : {
"responseCode" : "NOTFOUND",
"responseMessage" : "...",
"property" : "..."
}
}