internal static (string txt, string err) TranslateText(string text, string pair)
        {
            Console.WriteLine("TranslateText");
            if (string.IsNullOrWhiteSpace(pair))
            {
                return("", "No language pair provided");
            }
            Configuration cfg = new Configuration {
                AppKey = Common.GroupDocsKey,
                AppSid = Common.GroupDocsSID
            };
            TranslationApi api      = new TranslationApi(cfg);
            TextInfo       textInfo = new TextInfo {
                Pair = pair,
                Text = text
            };
            string userRequest                = $"'[{JsonConvert.SerializeObject(textInfo)}]'";
            TranslateTextRequest request      = new TranslateTextRequest(userRequest);
            TextResponse         textResponse = api.RunTranslationTextTask(request);

            if (textResponse.Status != "ok")
            {
                return("", textResponse.ToString());
            }
            return(textResponse.Translation, "");
        }
        static TextResponse TranslateText(Configuration conf)
        {
            // add text for translation and language pair
            string pair = "en-fr";
            string text = "Welcome to Paris";

            TranslationApi       api      = new TranslationApi(conf);
            TranslateTextRequest request  = api.CreateTextRequest(pair, text);
            TextResponse         response = api.RunTranslationTextTask(request);

            return(response);
        }