mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 20:43:07 +00:00
9dae7dad67
move encountertype datasource providing to core fix rerolling EC not updating characteristic remove some repeat logic calls relocate geolocation name fetch to separate class, add tests to ensure functionality, add languageID->country/region fetch method
85 lines
2.1 KiB
C#
85 lines
2.1 KiB
C#
namespace PKHeX.Core
|
|
{
|
|
/// <summary>
|
|
/// Contiguous series Game Language IDs
|
|
/// </summary>
|
|
public enum LanguageID : byte
|
|
{
|
|
/// <summary>
|
|
/// Undefined Language ID, usually indicative of a value not being set.
|
|
/// </summary>
|
|
/// <remarks>Gen5 Japanese In-game Trades happen to not have their Language value set, and express Language=0.</remarks>
|
|
Hacked = 0,
|
|
|
|
/// <summary>
|
|
/// Japanese (日本語)
|
|
/// </summary>
|
|
Japanese = 1,
|
|
|
|
/// <summary>
|
|
/// English (US/UK/AU)
|
|
/// </summary>
|
|
English = 2,
|
|
|
|
/// <summary>
|
|
/// French (Français)
|
|
/// </summary>
|
|
French = 3,
|
|
|
|
/// <summary>
|
|
/// Italian (Italiano)
|
|
/// </summary>
|
|
Italian = 4,
|
|
|
|
/// <summary>
|
|
/// German (Deutsch)
|
|
/// </summary>
|
|
German = 5,
|
|
|
|
/// <summary>
|
|
/// Unused Language ID
|
|
/// </summary>
|
|
/// <remarks>Was reserved for Korean in Gen3 but never utilized.</remarks>
|
|
UNUSED_6 = 6,
|
|
|
|
/// <summary>
|
|
/// Spanish (Español)
|
|
/// </summary>
|
|
Spanish = 7,
|
|
|
|
/// <summary>
|
|
/// Korean (한국어)
|
|
/// </summary>
|
|
Korean = 8,
|
|
|
|
/// <summary>
|
|
/// Chinese Simplified (简体中文)
|
|
/// </summary>
|
|
ChineseS = 9,
|
|
|
|
/// <summary>
|
|
/// Chinese Traditional (繁體中文)
|
|
/// </summary>
|
|
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";
|
|
}
|
|
}
|
|
}
|
|
}
|