View Single Post
12/02/18, 03:41 PM   #14
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,966
Originally Posted by r4cken View Post
@Deadsoon, no i dont have a swedish patch for the game running But i think it could be possible to make one for it since basically all translation strings are on the esoui git for both in game localization and internal-ingame localization. Is it possible to use a custom language.X code for the cvar?

/script d(GetCVar("language.2")) returns "en" so the client is indeed in english, but the addon menu and its settings, prints etc could use swedish with the translation you have?

If you check my post again i added the complete translation for the list you provided.
It's not that easy r4cken.
Check this explanation of addon multi-language support (which "Beam Me Up" uses as well):
https://wiki.esoui.com/How_to_add_localization_support

In short:
The language variable of your client (which is "en") will load the lua file with the translated strings. In this case "en.lua".
This is done already "before your addon code is executed" via the manifest txt file of the addon:
Code:
localization/$(language).lua
So you cannot change or preset the variable "$(language)" in the txt file somehow.
It is determined automatically.

The above line will load localization/en.lua for your client and e.g. localization/de.lua for my client.

To support non official languages:
You must load the en.lua file, and afterwards manually load strings of another language (the Swedish ones). To assure they get loaded you need some trigger and this is what I meant with a "Settings menu entry to manually choose the language, if it's not the client language".

Last edited by Baertram : 12/02/18 at 03:43 PM.
  Reply With Quote