"use strict";
export class Translation {
/** @param {{Key?:string,NL?:string,EN?:string,DE?:string,FR?:string,C1?:string,C2?:string,C3?:string,C4?:string,C5?:string,C6?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Key;
/** @type {string} */
NL;
/** @type {string} */
EN;
/** @type {string} */
DE;
/** @type {string} */
FR;
/** @type {string} */
C1;
/** @type {string} */
C2;
/** @type {string} */
C3;
/** @type {string} */
C4;
/** @type {string} */
C5;
/** @type {string} */
C6;
}
export class GetTranslationsResponse {
/** @param {{Translations?:Translation[],PreferredLanguage?:string,PreferredLanguageShort?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {Translation[]} */
Translations;
/** @type {string} */
PreferredLanguage;
/** @type {string} */
PreferredLanguageShort;
}
export class GetTranslations {
/** @param {{TranslateKeys?:string[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string[]} */
TranslateKeys;
}
JavaScript GetTranslations DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /xml/reply/GetTranslations HTTP/1.1
Host: dogw.klokgroep.nl
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetTranslations xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Globalization">
<TranslateKeys xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</TranslateKeys>
</GetTranslations>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetTranslationsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Globalization">
<PreferredLanguage>String</PreferredLanguage>
<PreferredLanguageShort>String</PreferredLanguageShort>
<Translations>
<Translation>
<C1>String</C1>
<C2>String</C2>
<C3>String</C3>
<C4>String</C4>
<C5>String</C5>
<C6>String</C6>
<DE>String</DE>
<EN>String</EN>
<FR>String</FR>
<Key>String</Key>
<NL>String</NL>
</Translation>
</Translations>
</GetTranslationsResponse>