Thread Tools Display Modes
12/02/18, 03:41 PM   #1
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,016
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
12/03/18, 12:35 PM   #2
@DeadSoon
AddOn Author - Click to view addons
Join Date: Sep 2018
Posts: 22
Originally Posted by Baertram View Post
It's not that easy r4cken.
Check this explanation of addon multi-language support (which "Beam Me Up" uses as well):
...
I used this method until yesterday. I realized, that by using this way, the Addon have no strings at all, when there is no translation file for the game client language. Because of this, currently RU and JP clients cant use my Addon.


In my latest implementation (not released yet) i load all localization files and I can decide on my own which translation I want to use. By this I can ensure, that if the localization for the game language is missing (RU, JP, ...), then I use the English localization in order to provide a working Addon (the feature "Survey & Treasure maps" may will not work properly).

To implement a option to provide manually changing of the Addon's language will not take much effort, but Im not sure, if such a feature is useful and common.

@Baertram: Do you know a complete list of language patches (beside EN, DE, FR), which are working properly (GetCVar("language.2") will returns the specific language)

Last edited by @DeadSoon : 12/03/18 at 12:38 PM.
  Reply With Quote

ESOUI » Developer Discussions » Translation Help » BeamMeUp need your translation 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