WoW:API GetLocale: Difference between revisions
Jump to navigation
Jump to search
(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> | ||
Revision as of 17:21, 31 October 2006
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