View Single Post
11/01/22, 02:14 PM   #6
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 656
Originally Posted by Lykeion View Post
The language I am referring to in this sentence is basically i18n files, such as en.lua, fr.lua and so on. Let's say my bilingual mode uses the language code fe
Yeah lets not call it fe, unless it really is fe. So that support can be added to addons now rather then attempting to make some hacked up code. I can load my game in any of ten different languages so one more won't be an issue. Most of my mods support all ten languages. Some are just not translated well enough because someone made a translation and then I have never heard from them again. If you are willing to translate any of my mods I'm happy to accept the translation.

Now if it is a variation of French like the difference between Spanish from Mexico or Spain, or French from France or French from Quebec then using fe makes sense. However, it should be added to the wiki and established as a standard so all authors know about it. Then nobody will try to use it to mean something else.

https://wiki.esoui.com/How_to_add_localization_support

Originally Posted by Lykeion View Post
I want eso to look for fr.lua first when the language code is fe, and then fall back to en.lua
There is no API for that, not possible. There is no need for that. It's not a standard method of doing things.

Once you use SetCVar("Language.2", "fe") it will be in fe only, period.

You can have Lua files load in this fashion.
Lua Code:
  1. i18n\en.lua -- load regardless of SetCVar()
  2. i18n\$(language).lua -- only loads the language set by SetCVar()
But first and foremost that must be in the authors mod. You can not alter or change that because it's part of the manifest file for the mod. So again no fallback, and also no outside control from another mod. The game will read the masifest.txt file at load time and that's it.

This is similar to what Baertram is getting at. It is not a fallback though.

If an author specifies en then the $(language), it will make it such that all the English strings are assigned first using ZO_CreateStringId(), and then if the same constant is used in the fe.lua file then whatever you put in ZO_CreateStringId() will be in fe.

Originally Posted by Lykeion View Post
(or whatever the author specifies as the default language) if it doesn't exist
You can not override the languages the author has provided in the manner you want.

Originally Posted by Lykeion View Post
Thanks to your answers
You are welcome and I am happy to help.

Originally Posted by Lykeion View Post
it looks like it is difficult to implement the features I envisioned on ESO at this time.
Not difficult, not possible.

Originally Posted by Lykeion View Post
Maybe in the future my team and I can come up with a smarter solution to solve the addon localization and bilingual mode incompatibility problem once and for all.
Not possible now or in the near future. That's not how it works.

So the TLDR is: What is the real language you are using and if you provide your bilingual mod I can look at it and make any improvements. Most likely what you want to achieve is not truly possible and only works in certain cases. So let the community help.

The solution would then be to translate the mods and let the authors use the translations.

Right now I can think of myself and at least 5 other authors that would use your translations in their mods.

Also if you are just translating mods but you want to translate the entire UI I can help get that set up the same as it is done for Korean, Italian, Ukrainian, Polish, and Portuguese. Chinese and Spanish were unofficial translations in the past but they are official and included with the game as of the latest patch.

Last edited by Sharlikran : 11/01/22 at 08:14 PM.
  Reply With Quote