I18nResource Resource

Resource to translate given keys (optionally including parameters)

GET /i18n/get

Get the current session language

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

Example

Request
GET /i18n/get
Content-Type: */*
Accept: application/json

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

                
{
  "code" : "...",
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /i18n/list

Response Body
media type data type description
application/json UILanguagesResponse (JSON)

Example

Request
GET /i18n/list
Content-Type: */*
Accept: application/json

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

                
{
  "items" : [ { }, { } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "perms" : {
    "property1" : [ "channelsync", "deletefolder" ],
    "property2" : [ "readitems", "translatepages" ]
  },
  "stagingStatus" : {
    "property1" : {
      "packageName" : "...",
      "included" : true
    },
    "property2" : {
      "packageName" : "...",
      "included" : true
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

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

Example

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

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

                
{
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

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;charset=UTF-8 string translated string

Example

Request
GET /i18n/t
Content-Type: */*
Accept: text/plain;charset=UTF-8

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8

                
...
                
              

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;charset=UTF-8 string translated string

Example

Request
GET /i18n/t/{key}
Content-Type: */*
Accept: text/plain;charset=UTF-8

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8

                
...