namespace PKHeX.Core { /// /// Contiguous series Game Language IDs /// public enum LanguageID : byte { /// /// Undefined Language ID, usually indicative of a value not being set. /// /// Gen5 Japanese In-game Trades happen to not have their Language value set, and express Language=0. Hacked = 0, /// /// Japanese (日本語) /// Japanese = 1, /// /// English (US/UK/AU) /// English = 2, /// /// French (Français) /// French = 3, /// /// Italian (Italiano) /// Italian = 4, /// /// German (Deutsch) /// German = 5, /// /// Unused Language ID /// /// Was reserved for Korean in Gen3 but never utilized. UNUSED_6 = 6, /// /// Spanish (Español) /// Spanish = 7, /// /// Korean (한국어) /// Korean = 8, /// /// Chinese Simplified (简体中文) /// ChineseS = 9, /// /// Chinese Traditional (繁體中文) /// ChineseT = 10, } public static partial class Extensions { public static string GetLanguage2CharName(this LanguageID lang) { switch (lang) { default: return "en"; case LanguageID.Japanese: return "ja"; case LanguageID.French: return "fr"; case LanguageID.Italian: return "it"; case LanguageID.German: return "de"; case LanguageID.Spanish: return "es"; case LanguageID.Korean: return "ko"; case LanguageID.ChineseS: case LanguageID.ChineseT: return "zh"; } } } }