using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MSGer.tk { public class Language { //2014.04.19. public static Dictionary UsedLangs = new Dictionary(); public Dictionary Strings = new Dictionary(); public Language(string lang) { UsedLangs.Add(lang, this); } public override string ToString() { return UsedLangs.FirstOrDefault(x => x.Value == this).Key; } public static Language FromString(string value) { Language tmp = null; try { tmp = UsedLangs[value]; } catch { } return tmp; } public static Language GetCuurentLanguage() { return Language.FromString(Settings.Default.lang); } } }