Thread Tools Display Modes
01-29-14, 05:06 PM   #1
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
But for any EU realm, the EU realm list will be used, no? Am I missing the point?
__________________
Grab your sword and fight the Horde!
  Reply With Quote
01-30-14, 06:53 AM   #2
jaliborc
A Chromatic Dragonspawn
 
jaliborc's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 196
Originally Posted by Vlad View Post
Blizzard define your realmList to a domain where your login server is located.

Luckily they prefix it, but they CAN use an IP directly breaking the code. It might also be different for Chinese servers.

For example http://wowchina.com/ don't even use the prefix like the us/eu does, so keep this in mind. The Chinese realmlist is cn#.grunt.wowchina.com
Thanks or the heads up.

Originally Posted by Lombra View Post
But for any EU realm, the EU realm list will be used, no? Am I missing the point?
Basically, it will work as long as we don't assume realmlists start all with the same format. One might simply check the entire realmlist string, for example.
  Reply With Quote
01-31-14, 01:19 PM   #3
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
Is it possible to get the server locale? Like deDE or something if it is a german server.

Btw: GetCVar("installLocale") is the same as GetLocale(). If you need to diffentiate between enUS/enGB then use GetCVar("locale") instead. Those are just the language preference of the client though.

Last edited by Rainrider : 01-31-14 at 01:24 PM.
  Reply With Quote
02-01-14, 05:54 AM   #4
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Rainrider View Post
Is it possible to get the server locale? Like deDE or something if it is a german server.

Btw: GetCVar("installLocale") is the same as GetLocale(). If you need to diffentiate between enUS/enGB then use GetCVar("locale") instead. Those are just the language preference of the client though.
Nope, the insallLocale is the language of your game's disc, but since they were shipping enUS disc to enGB too its enUS for users in Europe too. At least is should be different for chinese and korean users.

The GetCVar("locale") could work that was my second tought.
  Reply With Quote
02-01-14, 06:45 AM   #5
jaliborc
A Chromatic Dragonspawn
 
jaliborc's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 196
I think realmlist is really the way to go, and has been working son far for me. I'm want to detect connected servers, so I don't care about languages. If one really wants to know if a server is enUS or enGB, or if it is esES or esMX, I guess the solution is to use the realmlist and GetLocale in conjunction.
  Reply With Quote
02-01-14, 07:11 AM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by jaliborc View Post
If one really wants to know if a server is enUS or enGB, or if it is esES or esMX, I guess the solution is to use the realmlist and GetLocale in conjunction.
GetLocale actually returns "esES" or "esMX" as appropriate, as those are separate localizations with a few differences in their translations (eg. a different word for "dungeon" is used).

However, it does return "enUS" in an enGB client, and "ptBR" in a ptPT client, as there are not actually separate localizations for the EU variants of English and Portuguese; they just use the enUS and ptBR translations, so in those cases you would need to use the realmlist if you need to distinguish between them.

Originally Posted by Resike View Post
Nope, the insallLocale is the language of your game's disc, but since they were shipping enUS disc to enGB too its enUS for users in Europe too. At least is should be different for chinese and korean users.
The installLocale is whatever language the user chose when they first downloaded the installer, which can be any language the game is playable in. If anyone is actually still buying physical discs, I know the expansions are available in languages other than English; I'd assume the base game or "battle chest" or whatever they're calling it now is too.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
02-01-14, 09:14 AM   #7
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
I bought my German physical discs in Germany. I chose enGB (you can't choose enUS in europe) and I play on a German server. "installLocale" is still enUS for me for whatever reason. It is common to meet people playing in English. It is not uncommon to even see Russian. I can even take Italian and am still able to login to my German server. I think automated responses like those about boss encounter progress are better delivered in the server language as I can expect that the large majority of players on a German server can understand German. I can't expect them to know Italian. That would be my reason to look for the exact server locale and not just the region.
  Reply With Quote
02-01-14, 01:41 PM   #8
jaliborc
A Chromatic Dragonspawn
 
jaliborc's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 196
Well, the server language is really just a human protocol. See for instance Aggra EU, it's even in the english category but it's a portuguese server.
Anyway, given the region you can have a table mapping every realm to it's language. You only need to check the region because names in EU and US servers are shared.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Detect Current Region


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off