// @DataContract
export class Translation implements ITranslation
{
// @DataMember
public Key: string;
// @DataMember
public NL: string;
// @DataMember
public EN: string;
// @DataMember
public DE: string;
// @DataMember
public FR: string;
// @DataMember
public C1: string;
// @DataMember
public C2: string;
// @DataMember
public C3: string;
// @DataMember
public C4: string;
// @DataMember
public C5: string;
// @DataMember
public C6: string;
public constructor(init?: Partial<Translation>) { (Object as any).assign(this, init); }
}
// @DataContract
export class GetTranslationsResponse
{
// @DataMember
public Translations: Translation[];
// @DataMember
public PreferredLanguage: string;
// @DataMember
public PreferredLanguageShort: string;
public constructor(init?: Partial<GetTranslationsResponse>) { (Object as any).assign(this, init); }
}
export class GetTranslations
{
public TranslateKeys: string[];
public constructor(init?: Partial<GetTranslations>) { (Object as any).assign(this, init); }
}
TypeScript GetTranslations DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsonl/reply/GetTranslations HTTP/1.1
Host: doapigw.baasbv.nl
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"TranslateKeys":["String"]}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"Translations":[{"Key":"String","NL":"String","EN":"String","DE":"String","FR":"String","C1":"String","C2":"String","C3":"String","C4":"String","C5":"String","C6":"String"}],"PreferredLanguage":"String","PreferredLanguageShort":"String"}