public static TranslatedTexts TranslateTo(string Language) { TextAsset jsonInfo = Resources.Load <TextAsset>("i18n/" + Language); TranslatedTexts lenguageReader = JsonUtility.FromJson <TranslatedTexts>(jsonInfo.text); return(lenguageReader); }
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(); }
public TranslatedTexts(TranslatedTexts source) : base(source) { }
public TextTranslation this[string textPartKey] => TranslatedTexts.Single(f => f.TextPart.Key == textPartKey);