using System.Windows; namespace SparkClient.Model.Helper; /// /// 多语言工具类 /// public class MultilingualHelper { public static string getString(string key) { var result = Application.Current.TryFindResource(key); if (result == null) { throw new NullReferenceException(key + " is not a valid key"); } return (string)result; } }