WoW API: GetLocale

Revision as of 17:21, 31 October 2006 by WoWWiki>Mbudde

WoW API < GetLocale

locale = GetLocale();

Description

Taken from http://forums.curse-gaming.com/showthread.php?p=1777#post1777

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

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

Known results

"frFR": French
"deDE": German
"enUS": American english
"enGB": British english
"koKR": Korean
"zhCN": Chinese (simplified)
"zhTW": Chinese (traditional)
"ruRU": Russian (UI AddOn)
"esES": Spanish