Thread Tools Display Modes
09-21-08, 07:51 AM   #1
SteelDragon
A Murloc Raider
Join Date: May 2008
Posts: 4
Locale spoofing

For testing purpose i need to change current game locale to a custom one. Is there any way to spoof locale for all installed addons? I'm new in lua coding so detailed answers would appreciated.
  Reply With Quote
09-21-08, 08:01 AM   #2
Tristanian
Andúril
Premium Member
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 279
As far as I know the only way to achieve this, is to download the relevant language files, corresponding to the locale that interests you, install them, then select your preferred locale from within WoW (or the launcher). The addons should detect the locale properly and switch to it accordingly.
  Reply With Quote
09-21-08, 09:16 AM   #3
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
What if I create an addon that loads as very first and hook GetLocale() to return a custom locale string? Would that work?

Just tested that. It's working ... at least for the addons.
Addon name: !!!!!!!!!Locale
Addon code: GetLocale = function() return "enGB" end

Last edited by Duugu : 09-21-08 at 09:26 AM.
  Reply With Quote
09-21-08, 11:21 AM   #4
Tristanian
Andúril
Premium Member
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 279
Originally Posted by Duugu View Post
What if I create an addon that loads as very first and hook GetLocale() to return a custom locale string? Would that work?

Just tested that. It's working ... at least for the addons.
Addon name: !!!!!!!!!Locale
Addon code: GetLocale = function() return "enGB" end
Haha, amazing hack. I wonder though what kind of other implications this may have.
  Reply With Quote
09-21-08, 11:51 AM   #5
SteelDragon
A Murloc Raider
Join Date: May 2008
Posts: 4
Originally Posted by Duugu View Post
What if I create an addon that loads as very first and hook GetLocale() to return a custom locale string? Would that work?

Just tested that. It's working ... at least for the addons.
Addon name: !!!!!!!!!Locale
Addon code: GetLocale = function() return "enGB" end
Nope, that don't work for many addons. At least, not for Ace-based. Tryed this myself. BTW, what client have you used to test your addon? Don't tell me it was enGB
  Reply With Quote
09-21-08, 12:24 PM   #6
SteelDragon
A Murloc Raider
Join Date: May 2008
Posts: 4
Duugu, hmm... Looks like it works after all I've tried it before but the trick was in addon name. Thanks for your help.
  Reply With Quote
09-21-08, 04:00 PM   #7
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Originally Posted by Tristanian View Post
I wonder though what kind of other implications this may have.
Some very subtle. ;D

@SteelDragon: Don't know what you are about to test ... but there are other functions plus variables that will return localized strings.
Example:
Code:
name, rank, subgroup, level, class, fileName, zone, online, isDead, role, isML = GetRaidRosterInfo(raidIndex);
class
String - The character's class (localized), with the first letter capitalized (e.g. "Priest").

Last edited by Duugu : 09-21-08 at 04:17 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Locale spoofing


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