WoW:API GetExistingLocales: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Created page with '{{wowapi}} Return a list of installed language packs. lang1, lang2, ... = GetExistingLocales(); == Returns == ; lang1, lang2, ... : String - Token identifying a language pack l…')
 
m (Move page script moved page API GetExistingLocales to API GetExistingLocales without leaving a redirect)
 
(No difference)

Latest revision as of 04:45, 15 August 2023

WoW API < GetExistingLocales

Return a list of installed language packs.

lang1, lang2, ... = GetExistingLocales();

Returns[edit]

lang1, lang2, ...
String - Token identifying a language pack locale. For example: "enGB", "frFR", "enTW".

Details[edit]

  • Currently loaded locale identifier is stored in the "locale" CVar.
  • Language pack tokens can be translated to a description by using an upper-cased version as a global variable name:
lang1 = GetExistingLocales();
print(_G[lang1:upper()]);