no edit summary
(Added spanish locale) |
No edit summary |
||
| Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ | |||
locale = GetLocale(); | |||
== Description == | |||
Taken from http://forums.curse-gaming.com/showthread.php?p=1777#post1777 | 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. | 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 == | |||
<pre> | |||
if (GetLocale() == "frFR") then | if (GetLocale() == "frFR") then | ||
-- things for the french client | -- things for the french client | ||
| Line 14: | Line 18: | ||
-- for the rest, usually english since it's the default language | -- for the rest, usually english since it's the default language | ||
end | end | ||
</pre> | |||
== Known results == | |||
"frFR": French<br> | |||
"deDE": German<br> | |||
"frFR": | |||
"deDE": | |||
"enUS": American english<br> | "enUS": American english<br> | ||
"enGB": British english<br> | "enGB": British english<br> | ||
"koKR": | "koKR": Korean<br> | ||
"zhCN": | "zhCN": Chinese (simplified)<br> | ||
"zhTW": | "zhTW": Chinese (traditional)<br> | ||
"ruRU": | "ruRU": Russian (UI AddOn)<br> | ||
"esES": | "esES": Spanish<br> | ||