Translator Algorithm

The English language draws a terminological distinction (which makes not exist in every language) between translate (a write text) and interpreting (oral or signed communication between users of different languages); under this distinction, translation can begin only after the appearance of writing within a language community. On the other hand, such" spill-overs" have sometimes imported useful source-language calques and loanwords that have enriched target languages. 

The wide historic trends in Western translation practice may be exemplify on the example of translation into the English language. Meanwhile, in Renaissance Italy, a new period in the history of translation had opened in Florence with the arrival, at the court of Cosimo de' Medici, of the Byzantine scholar Georgius Gemistus Pletho shortly before the fall of Constantinople to the Turks (1453).Chaucer established an English poetic tradition on adaptations and translations from those earlier-established literary languages.
using System.Collections.Generic;
using System.Text;

namespace Algorithms.DataCompression
{
    /// <summary>
    /// TODO.
    /// </summary>
    public class Translator
    {
        /// <summary>
        /// TODO.
        /// </summary>
        /// <param name="text">TODO. 2.</param>
        /// <param name="translationKeys">TODO. 3.</param>
        /// <returns>TODO. 4.</returns>
        public string Translate(string text, Dictionary<string, string> translationKeys)
        {
            var sb = new StringBuilder();

            var start = 0;
            for (var i = 0; i < text.Length; i++)
            {
                var key = text.Substring(start, i - start + 1);
                if (translationKeys.ContainsKey(key))
                {
                    _ = sb.Append(translationKeys[key]);
                    start = i + 1;
                }
            }

            return sb.ToString();
        }
    }
}

LANGUAGE:

DARK MODE: