namespace PKHeX.Core; /// /// Game Language IDs /// public enum LanguageGC : 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, /// /// German (Deutsch) /// German = 3, /// /// French (Français) /// French = 4, /// /// Italian (Italiano) /// Italian = 5, /// /// Spanish (Español) /// Spanish = 6, /// /// Unused Language ID /// /// Was reserved for Korean in Gen3 but never utilized. UNUSED_6 = 7, } // Extension to remap LanguageGC to LanguageID public static class LanguageGCRemap { public static LanguageID ToLanguageID(this LanguageGC lang) => lang switch { LanguageGC.Hacked => LanguageID.Hacked, LanguageGC.Japanese => LanguageID.Japanese, LanguageGC.English => LanguageID.English, LanguageGC.German => LanguageID.German, LanguageGC.French => LanguageID.French, LanguageGC.Italian => LanguageID.Italian, LanguageGC.Spanish => LanguageID.Spanish, _ => LanguageID.English, }; public static LanguageGC ToLanguageGC(this LanguageID lang) => lang switch { LanguageID.Hacked => LanguageGC.Hacked, LanguageID.Japanese => LanguageGC.Japanese, LanguageID.English => LanguageGC.English, LanguageID.German => LanguageGC.German, LanguageID.French => LanguageGC.French, LanguageID.Italian => LanguageGC.Italian, LanguageID.Spanish => LanguageGC.Spanish, _ => LanguageGC.English, }; }