Esempio n. 1
0
        public TranslatedTexts GetTextsWithFallback(string locale)
        {
            var result = new TranslatedTexts(MainTranslations);

            if (translations.TryGetValue(locale, out var translated))
            {
                foreach (var key in result.Keys.ToList())
                {
                    if (translated.TryGetValue(key, out var value) && !string.IsNullOrWhiteSpace(value))
                    {
                        result[key] = value;
                    }
                }
            }

            return(result);
        }
Esempio n. 2
0
 public TranslatedTexts(TranslatedTexts source)
     : base(source)
 {
 }