DigiOffice Gateway Web Services

<back to all web services

GetTranslations

using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using IDB.API.DTO.Globalization;

namespace IDB.API.DTO.Globalization
{
    public partial class GetTranslations
    {
        public GetTranslations()
        {
            TranslateKeys = new List<string>{};
        }

        public virtual List<string> TranslateKeys { get; set; }
    }

    [DataContract]
    public partial class GetTranslationsResponse
    {
        public GetTranslationsResponse()
        {
            Translations = new List<Translation>{};
        }

        [DataMember]
        public virtual List<Translation> Translations { get; set; }

        [DataMember]
        public virtual string PreferredLanguage { get; set; }

        [DataMember]
        public virtual string PreferredLanguageShort { get; set; }
    }

    [DataContract]
    public partial class Translation
        : ITranslation
    {
        [DataMember]
        public virtual string Key { get; set; }

        [DataMember]
        public virtual string NL { get; set; }

        [DataMember]
        public virtual string EN { get; set; }

        [DataMember]
        public virtual string DE { get; set; }

        [DataMember]
        public virtual string FR { get; set; }

        [DataMember]
        public virtual string C1 { get; set; }

        [DataMember]
        public virtual string C2 { get; set; }

        [DataMember]
        public virtual string C3 { get; set; }

        [DataMember]
        public virtual string C4 { get; set; }

        [DataMember]
        public virtual string C5 { get; set; }

        [DataMember]
        public virtual string C6 { get; set; }
    }

}

C# GetTranslations DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /json/reply/GetTranslations HTTP/1.1 
Host: digiofficeapigateway.deltares.nl 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"TranslateKeys":["String"]}
HTTP/1.1 200 OK
Content-Type: application/json
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"}