Пример #1
0
    public static TranslatedTexts TranslateTo(string Language)
    {
        TextAsset       jsonInfo       = Resources.Load <TextAsset>("i18n/" + Language);
        TranslatedTexts lenguageReader = JsonUtility.FromJson <TranslatedTexts>(jsonInfo.text);

        return(lenguageReader);
    }
Пример #2
0
        public void Run()
        {
            var keys = new TranslatedTexts();

            foreach (var text in service.MainTranslations)
            {
                keys.Add(text.Key, string.Empty);
            }

            var fullName = Path.Combine(folder.FullName, fileName);

            if (!folder.Exists)
            {
                Directory.CreateDirectory(folder.FullName);
            }

            service.WriteTo(keys, fullName);

            service.Save();
        }
Пример #3
0
 public TranslatedTexts(TranslatedTexts source)
     : base(source)
 {
 }
Пример #4
0
 public TextTranslation this[string textPartKey] => TranslatedTexts.Single(f => f.TextPart.Key == textPartKey);