Пример #1
0
        /// <summary>
        /// Translates a string
        /// </summary>
        /// <param name="id">The id of the translation value</param>
        /// <param name="field">The field of the translation value</param>
        /// <param name="def">The default value (sets to field if empty)</param>
        /// <returns>The string associated with the translation value</returns>
        public static string T(string id, string field = "Text", string def = "")
        {
            if (def == "")
            {
                def = field;
            }
            LanguageDictionary dictionary = LanguageDictionary.GetDictionary(LanguageContext.Instance.Culture);

            return((string)dictionary.Translate(id, field, def, typeof(string)));
        }