Create a Custom Language Code

post

/content/management/api/v1.1/l10n/languageCodes

Creates a custom language code with the given payload.

Request

Supported Media Types
Query Parameters
Header Parameters
Body ()
Creates a language code with the given information in the payload. Language code is case-insensitive i.e., cannot create a language code with existing language code even in a different case. Only code and description will be considered from payload. Code should be maximum of 64 characters and description should be maximum of 128 characters. All other fields will be ignored even if given in the payload.
Root Schema : LanguageBean
Type: object
Show Source
Nested Schema : date
Type: object
date
Show Source
Back to Top

Response

Supported Media Types

201 Response

Created.
Body ()
Root Schema : LanguageBean
Type: object
Show Source
Nested Schema : date
Type: object
date
Show Source

400 Response

Bad request.

404 Response

Not found.

409 Response

Conflict.

500 Response

Internal server error.
Back to Top

Examples

The following example shows how to creates a custom language code with the given payload by submission of a POST request on the REST resource using cURL:

curl -X POST -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' 'https://host:port/content/management/api/v1.1/l10n/languageCodes'

Example 1:

This creates a custom language code. Replace payload with your own data.

/content/management/api/v1.1/l10n/languageCodes

Request Payload

{
  "code": "en-x-my-custom-subtag",
  "description": "en-x-my-custom-subtag description."
}      

Request Headers

{
  "Content-Type": "application/json",
  "X-Requested-With": "XMLHttpRequest"
}

Response Body

{
        "code": "en-x-my-custom-subtag",
        "language": "English",
        "description": "en-x-my-custom-subtag description",
        "territory": null,
        "script": null,
        "languageType": "custom",
        "createdBy": "swebcli.SitesAdmin1.admin",
        "createdDate": {
          "value": "2020-04-30T18:37:20.671Z",
          "timezone": "UTC"
        },
        "updatedBy": "swebcli.SitesAdmin1.admin",
        "updatedDate": {
          "value": "2020-04-30T18:37:20.671Z",
          "timezone": "UTC"
        },
        "links": [
          {
            "href": "http://swebcli-oracle.testec.cec.oraclecorp.com:8080/content/management/api/v1.1/l10n/languageCodes",
            "rel": "self",
            "method": "POST",
            "mediaType": "application/json"
          },
          {
            "href": "http://swebcli-oracle.testec.cec.oraclecorp.com:8080/content/management/api/v1.1/l10n/languageCodes",
            "rel": "canonical",
            "method": "POST",
            "mediaType": "application/json"
          },
          {
            "href": "http://swebcli-oracle.testec.cec.oraclecorp.com:8080/content/management/api/v1.1/metadata-catalog/l10n/languageCodes",
            "rel": "describedby",
            "method": "GET",
            "mediaType": "application/schema+json"
          }
        ]
      }
Back to Top