Quantcast
Get unit locale - WoWInterface
Thread Tools Display Modes
02-11-17, 10:40 AM   #1
Marsgames
An Aku'mai Servant
 
Marsgames's Avatar
Join Date: Jul 2016
Posts: 33
Get unit locale

Hi,

Is there a way to know the client locale of my target (enUS, deDE, frFR...) ?

Thanks.
  Reply With Quote
02-11-17, 11:20 AM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,703
For your client you can use GetLocale().
For your target (or any unit) you could match their realm against the ones available. The list would map their realm name to their locale.
I think I saw a library doing something like that around.

Yup, http://www.wowinterface.com/download...RealmInfo.html

Last edited by p3lim : 02-11-17 at 11:24 AM.
  Reply With Quote
02-11-17, 12:08 PM   #3
Marsgames
An Aku'mai Servant
 
Marsgames's Avatar
Join Date: Jul 2016
Posts: 33
Thank you very much. Have to learn how it works and it will be perfect
  Reply With Quote
02-11-17, 01:51 PM   #4
pas06
A Theradrim Guardian
Join Date: Apr 2009
Posts: 61
Maybe this addon is what you are looking for: https://mods.curse.com/addons/wow/tooltiprealminfo
  Reply With Quote
02-11-17, 02:59 PM   #5
Marsgames
An Aku'mai Servant
 
Marsgames's Avatar
Join Date: Jul 2016
Posts: 33
Thank you all, thanks to you I succed to do what I wanted
  Reply With Quote
02-11-17, 07:31 PM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,978
Locale from server name isn't a reliable process as many regions can have players of different locales. This means any one server can have multiple locales of players playing it and since the server doesn't care what locale a game client is in, it's not something that'll ever be made available to us.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
02-12-17, 04:58 AM   #7
Marsgames
An Aku'mai Servant
 
Marsgames's Avatar
Join Date: Jul 2016
Posts: 33
Yes, I think, but in fact I just wanted to send a message in the right language, so it's ok for me, I hope if someone play on german or english server, he knows how to speak german or english
  Reply With Quote
02-13-17, 10:00 AM   #8
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,978
Unfortunately, without the same addon running on both sides, there's no way to get another player's locale. The servers were set up in a way in which this matter is irrelevant and are grouped by location instead as indicated by your region. As mentioned earlier, there are libraries that give you a likely scenario based on server name, but this is based on what percentage of a server's population is of a specific locale from census data collected provided from users themselves. Also, other players can be multilingual, so you can try in whatever languages you feel comfortable conversing in. There's no harm in it.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 02-13-17 at 10:03 AM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Get unit locale

Thread Tools
Display Modes

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