View Single Post
01-27-14, 01:14 PM   #4
jaliborc
A Chromatic Dragonspawn
 
jaliborc's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 196
Originally Posted by Resike View Post
GetCVar("installLocale") isnt better?

But it's flaw its returns enUS for enGB clients too.

Actually i have no portal named cvar so i'm not sure what it that.
Like you mentioned, it is not guaranteed to distinguish same locales on different regions, so it's not a solution. But thanks for the tip!

Originally Posted by Dridzt View Post
I've been using
Code:
local realmlist = GetCVar("realmList")
local region, rest = string.match(realmlist,"(%a+)%.(.+)")
if region then
  -- use region
end
in my addons for years, had no complaints from users so I'd guess it works
If you have been using it, then it's good enough for me!
  Reply With Quote