View Single Post
04/07/22, 12:15 AM   #8
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 660
Sent you a PM with New Files.

So to start with some of it was just simple Lua stuff. If there is a function self:getLanguage() but you don't have a function "TurkishScrollsOnline:getLanguage()" then it will not check the language set by the game. It will probably error but I didn't see that because I noticed it right away and changed it first.

However, there was a few other things. Like isNeedToChangeAdditionalFontTable is a table of languages that are supported. For example tr and en. So you need a table for the for loop.

Then in the TurkishScrollsOnline.txt you did not specify that LibMediaProvider was a dependency, and you did not even load the fontFaces.lua file.

You had
Code:
## Title: Turkish Scrolls Online - Türkçe Çeviri
## Author: Balgamov
## APIVersion: 101032
## SavedVariables: TurkishScrollsOnlineVars
## Version: 0.106
## Description: Elder Scrolls Online Türkçe Çeviri - Balgamov

TurkishScrollsOnline.lua
TurkishScrollsOnline.xml
You needed to have
Code:
## Title: Turkish Scrolls Online - Türkçe Çeviri
## Author: Balgamov
## APIVersion: 101032
## SavedVariables: TurkishScrollsOnlineVars
## Version: 0.106
## Description: Elder Scrolls Online Türkçe Çeviri - Balgamov
## DependsOn: LibMediaProvider-1.0>=17

TurkishScrollsOnline.lua
TurkishScrollsOnline.xml
fontFaces.lua
Code:
local function OnLoad(eventCode, addOnName)
  if addOnName == TurkishScrollsOnline.name then
    EVENT_MANAGER:UnregisterForEvent(TurkishScrollsOnline.name, EVENT_ADD_ON_LOADED)

   <<  Do Stuff >>
  end
end
EVENT_MANAGER:RegisterForEvent(TurkishScrollsOnline.name, EVENT_ADD_ON_LOADED, OnLoad)
Also the On load event was not set up. You were not waiting for the game to actually start loading your mod.

Then also if there is a function to alter the fonts like TurkishScrollsOnline:fontChangeWhenInit() to set all the fonts you need to actually call it during initialization prior to TurkishScrollsOnline:RefreshUI().

In the "EsoUI\lang" folder those files need to have font declerations
Code:
[Font:ZoFontWinH1] = "TurkishScrollsOnline/fonts/univers67.otf|30|soft-shadow-thick"
For anything you wish to change to your fonts so that your Turkish glyphs will be used.

Lastly I could not for the life of me figure out how to change the language. I could not figure out how to get the flags to show up so I could click the Turkish flag. Why is that important? Well because when your language is EN then you use the English client and pregame files with the standard default EsoUI fonts.

To get the game to use the Turkish fonts you need to actually set the language to "tr" or the files won't be loaded at all.

/script SetCVar("language.2","tr")

/script SetCVar("language.2","en")

You have to load the game with the files I sent you and THEN switch to TR or you will not experience the font changes. So if you know how to use the flags with your mod then click the red Turkish flag and the fonts should change. If you do not click the Turkish flag (because you didn't set that up yet) then you have to manually change the language.

Changing the language is the last step and if you don't do it then the mod doesn't alter the fonts.

Last edited by Sharlikran : 04/07/22 at 12:25 AM.
  Reply With Quote