API GetLocale

104,642pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

WoW API < GetLocale

Returns information about the client locale.

locale = GetLocale();

Description Edit

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:

Example Edit

if (GetLocale() == "frFR") then
    -- things for the french client
    -- for the rest, usually english since it's the default language

Locales Edit

  • "frFR": French (France)
  • "deDE": German (Germany)
  • "enGB : English (Great Brittan) if returned, can substitute 'enUS' for consistancy
  • "enUS": English (America)
  • "itIT": Italian (Italy)
  • "koKR": Korean (Korea) RTL - right-to-left
  • "zhCN": Chinese (China) (simplified) implemented LTR left-to-right in WoW
  • "zhTW": Chinese (Taiwan) (traditional) implemented LTR left-to-right in WoW
  • "ruRU": Russian (Russia)
  • "esES": Spanish (Spain)
  • "esMX": Spanish (Mexico)
  • "ptBR": Portuguese (Brazil)

Also on Fandom

Random Wiki