Thread Tools Display Modes
09-14-12, 10:32 AM   #1
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
UI Always picks another Language on first load up. Please help!

For some reason my UI that I have available for download will by default pick Dutch or another language for when loading up the game for the first time and I have to keep changing it back to English. It is annoying but I do not know what I need to change in the WTF folder when I set it up for uploading so that it sticks to English. The weird thing is each time I log out with the UI and get ready to copy the files and get ready to upload them, I always log out with the language in English as that is the only language I know. No idea why it picks another language for.

Can anyone help me?

If you want to look at the UI files they are here

Thank you!
  Reply With Quote
09-14-12, 10:54 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,335
If you know how to set your UI's language through Lua code, you can try having the default choose based on GetLocale().
__________________
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
09-14-12, 11:10 AM   #3
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
What do you mean when you say "for the first time"? Do you mean every time you launch WoW?
  Reply With Quote
09-14-12, 01:02 PM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,335
It my guess is the SavedVariables aren't loading properly when initially installed. After the first logout the game client writes to where they should be and loads them successfully upon future logins. This kind of issue is what leads me to believe writing an initialization addon for the UI that injects the initial settings into memory. This can be as simple as copying all the SavedVariables used into their own addon folder and add a ToC file to load them in. Just make sure they load before any addon that would use them.

As simple as it is, it may not work in most situations as they can be overwritten by addons expecting nothing to be there and write their own defaults. In this case, you may have to go into each individual addon and modify their defaults internally.
__________________
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 : 09-14-12 at 01:07 PM.
  Reply With Quote
09-14-12, 01:41 PM   #5
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Sorry for the slow reply. When I say for the first time, I mean when I change my config file to just:
SET uiScale "0.75"
And nothing else and then change some files like my account name to ACCOUNTNAME etc and have it uploaded to wowinterface. Then if I try downloading it and setting it up for a test and to find any bugs for example, the language gets changed and if that is happening for everyone, that can be a pain.

I was wondering what is causing this.

Thank you for the replies and that is very interesting to know SDPhantom and might look into this but if there is a more simple way then that is great.

I would add in the part with SET local () but I do not like messing with that as I know that if you set it to EU servers then the US realms do not work with the UI.

Last edited by Mayron : 09-14-12 at 01:44 PM.
  Reply With Quote
09-14-12, 03:39 PM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
I haven't tried loading your UI in-game yet, but one obvious problem is that your Config.wtf file only includes a uiScale setting. Since it's missing all of the other settings that the game normally sets the first time it loads, the game is probably just ignoring it and reverting to defaults. Try using your actual Config.wtf file, and just remove the personal information (account name, last server, last character index, realmlist, etc). You might also need to include Launcher.wtf and/or other settings files the game creates on first run.

On a side note, your MayronSetup.lua file is full of inefficient and redundant class checks and hardcoded colors. Instead of things like this:
Code:
	local _, class = UnitClass("player")
	if class == "WARRIOR" then
		B1:SetBackdropColor(0.78, 0.61, 0.43)
	elseif class == "PRIEST" then
		B1:SetBackdropColor(0.6, 0.6, 0.6)
	elseif class == "MAGE" then
		B1:SetBackdropColor(0.41, 0.80, 0.94)
	elseif class == "DRUID" then
		B1:SetBackdropColor(1.00, 0.49, 0.04)
	elseif class == "PALADIN" then
		B1:SetBackdropColor(0.96, 0.55, 0.73)
	elseif class == "HUNTER" then
		B1:SetBackdropColor(0.67, 0.83, 0.45)
	elseif class == "ROGUE" then
		B1:SetBackdropColor(1.00, 0.96, 0.41)
	elseif class == "SHAMAN" then
		B1:SetBackdropColor(0.0, 0.44, 0.87)
	elseif class == "WARLOCK" then
		B1:SetBackdropColor(0.58, 0.51, 0.79)
	elseif class == "DEATHKNIGHT" then
		B1:SetBackdropColor(0.77, 0.12, 0.23)
	end
You should do a single lookup at the top of the file:
Code:
local classcolor = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[(select(2, UnitClass("player")))]
Then every time you want to color something, you can do it with a single line:
Code:
	B1:SetBackdropColor(classcolor.r, classcolor.g, classcolor.b)
On another side note, WoW isn't localized in Dutch; you're probably seeing German.
__________________
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
09-15-12, 01:32 AM   #7
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Thank you so much for that Phanx. My coding skills are horrific so that is a lot of help.

When you say keep my config file but just remove personal information. I need to remove the realm type like enGB and not sure if that will matter either. I need it to work for everyone not just the EU. Also for some reason I have not had a Launcher file in ages, after deleting it about a month ago it never recreated itself like it usually use to do.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » UI Always picks another Language on first load up. Please help!


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