About this resource
Representation of a Language
Properties
Property | Description | Type |
---|---|---|
createdOn | Gets the created on date in UTC of this language. | datetime |
culture | Gets the culture of this language. | string |
id | Gets the language identifier. | guid |
isEnabledForFields | Gets or sets a value indicating whether this language is enabled for fields. | boolean |
isEnabledForUI | Gets a value indicating whether this language is enabled for UI. | boolean |
modifiedOn | Gets the modified on date in UTC of this language. | datetime |
name | Gets the name of this language. | string |
tag | Gets the Tag of this object. The value of this property has to be valid Xml. This property will not be returned by default. In order to include the property in the response, add a header with the name 'select-language' and the value 'Tag' to your request. | string |
Relations
Method | Name | Select-key | Resource type | Description |
---|---|---|---|---|
GET | self | Provides a link to this resource. | ||
GET | image | select-Language: image | Image | Gets the language's image |
GET | createdby | select-Language: createdby | User | Gets or sets the user that created this language. |
GET | modifiedby | select-Language: modifiedby | User | Gets or sets the user that last modified this language. |
Actions
Method | Action | Description | Response codes | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
GET /language/{languageId}/synonyms | export | Exports the list of synonyms for this language | |||||||||
PUT /language/{languageId}/synonyms | import | Imports the list of synonyms for this language |
|
||||||||
DELETE /language/{languageId} | delete | Deletes an existing language. |
|
||||||||
PUT /language/{languageId} | edit | Edits an existing language. |
|
Examples
Exporting synonyms
To export synonyms, issue a GET request to the /language/{id}/synonyms endpoint:
GET /language/1b35bde3-c0d0-4eaa-8cdc-0afc662e583d/synonyms HTTP/1.1
This will return the synonyms as a solr formatted file.
A Content-Disposition header will be added to the download.
Importing synonyms
To import synonyms, issue a PUT request to the /language/{id}/synonyms
endpoint with the synonym list in solr file format as multipart form-data content:
PUT /language/1b35bde3-c0d0-4eaa-8cdc-0afc662e583d/synonyms HTTP/1.1 Content-Length: 244947 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) ... api-version: 1 Authorization: Token OWQ0NWUxMjNkNDYyNDEzOTkzZDZiNWI4Mzk4ZTliZTY6QURBTU5FVA== Content-Type: multipart/form-data; boundary=----BoundaryzZaqkP0Sxn4p9XFF ------BoundaryzZaqkP0Sxn4p9XFF Content-Disposition: form-data; name="file1"; filename="synonyms_solr.txt" Content-Type: text/plain [content]
Deleting a language
DELETE /language/c584888369ab4f049f367ea9f19137e3
Editing a language (full body)
PUT /Language/1fe6e87a31bc4208bd1ca4f000dbfaff { "name": "Language Name", "culture": "nl-BE", "enabledForFields": false, "tag": "<tag>xml</tag>" }