WoW:API GetLocale: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 21: Line 21:
"frFR": french
"frFR": french
"deDE": german
"deDE": german
"usEN": english
"enUS": english
"koKR": korean
"koKR": korean
"zhCN": chinese
"zhCN": chinese
"ruRU": russian (UI AddOn)

Revision as of 06:08, 18 November 2005

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:

Code:


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": english "koKR": korean "zhCN": chinese "ruRU": russian (UI AddOn)