Hello there! We are conducting a survey to better understand the user experience in making a first edit. If you have ever made an edit on Gamepedia, please fill out the survey. Thank you!
Returns information about the client locale.
locale = GetLocale();
The locale is what makes it possible to know what language the interface is using and thus determine which specific code is going to be executed in a localized addon.
Typically, this is used in a GetLocale block:
if (GetLocale() == "frFR") then -- things for the french client else -- for the rest, usually english since it's the default language end
- deDE: German (Germany)
- enGB: English (United Kingdom) - enGB clients return enUS
- enUS: English (United States)
- esES: Spanish (Spain)
- esMX: Spanish (Mexico)
- frFR: French (France)
- itIT: Italian (Italy)
- koKR: Korean (Korea)
- ptBR: Portuguese (Brazil)
- ruRU: Russian (Russia) - UI AddOn
- zhCN: Chinese (Simplified, PRC)
- zhTW: Chinese (Traditional, Taiwan)