m
Move page script moved page API GetLocale to WoW:API GetLocale without leaving a redirect
No edit summary |
m (Move page script moved page API GetLocale to WoW:API GetLocale without leaving a redirect) |
||
| (10 intermediate revisions by 10 users not shown) | |||
| Line 1: | Line 1: | ||
{{wowapi}}Returns information about the client locale. | |||
locale = GetLocale(); | |||
== Description == | |||
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 15: | ||
-- 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> | |||
== Locales == | |||
* "frFR": French (France) | |||
* "deDE": German (Germany) | |||
* "enGB": English (Great Britain) ''if returned, can substitute 'enUS' for consistancy'' | |||
" | * "enUS": English (America) | ||
" | * "itIT": Italian (Italy) | ||
"enUS": | * "koKR": Korean (Korea) ''RTL - right-to-left'' | ||
" | * "zhCN": Chinese (China) (simplified) ''implemented LTR left-to-right in WoW'' | ||
"koKR": | * "zhTW": Chinese (Taiwan) (traditional) ''implemented LTR left-to-right in WoW'' | ||
"zhCN": | * "ruRU": Russian (Russia) | ||
"zhTW": | * "esES": Spanish (Spain) | ||
"ruRU": | * "esMX": Spanish (Mexico) | ||
* "ptBR": Portuguese (Brazil) | |||