LoTROInterface

LoTROInterface (https://www.lotrointerface.com/forums/index.php)
-   General Authoring Discussion (L) (https://www.lotrointerface.com/forums/forumdisplay.php?f=22)
-   -   Localization (https://www.lotrointerface.com/forums/showthread.php?t=4052)

Morgantine 09-23-2023 02:07 PM

Localization
 
Folks who have localized your apps for work in English, French, and German, how do you find the right terminology? There isn't some reference somewhere with all of the names LOTRO uses now, is there? Or do you switch languages in the game (this is what I do), or have friends to help, or ask the forums, or...?

Curious what resources there are out there and if I'm doing it the hard way.

homeopatix 09-25-2023 03:01 PM

Hello,

I do not know if i am doing the right way, but for me.

i initialize the language at the start of the addon,depending on the language
that the user have chosen, like this, in my library file (that load all the libraries needed for my addon)

i import the needed file depending of the language
------------------------------------------------------------------------------------------
-- Import Globals --
------------------------------------------------------------------------------------------
if Turbine.Engine.GetLanguage() == Turbine.Language.German then
import "Homeopatix.AltHolic.Localization.GlobalsDE";
GLocale = "de";
elseif Turbine.Engine.GetLanguage() == Turbine.Language.French then
import "Homeopatix.AltHolic.Localization.GlobalsFR";
GLocale = "fr";
elseif Turbine.Engine.GetLanguage() == Turbine.Language.English then
import "Homeopatix.AltHolic.Localization.GlobalsEN";
GLocale = "en";
end

and then in the three different language file

in french :
_G.T = {};
------------------------------------------------------------------------------------------
-- Francais --
------------------------------------------------------------------------------------------
T[ "Lang" ] = "Français";

in english :
_G.T = {};
------------------------------------------------------------------------------------------
-- English --
------------------------------------------------------------------------------------------
T[ "Lang" ] = "English";

in german :
_G.T = {};
------------------------------------------------------------------------------------------
-- Deutsch´ --
------------------------------------------------------------------------------------------
T[ "Lang" ] = "German";


and in the your code, you juste have to call the T[ "Lang" ] array the get the valor in the
defined language

hope that will help you

Homeo

Hyoss 09-27-2023 02:51 AM

I happen to be both fluent in English and German and switching the client's language I accomplish using OneLauncher and it's launch parameters - that makes switching the client language way more convenient, as I can create shortcuts to launch in En, DE, FR.

For French, I have over the years used Google translate first and accepted corrections from the community as they were sending them in.

gilzon 01-12-2024 12:41 AM

Okay so i wanted (and still want) to translate prime plugin and i did get the same question, so i made researches the best source of translation is effectively lotro it self. And more precisely the dat files.
There is 2 solutions to extract data from it
the first are this old extractors
LOCALDATAEXTRACTOR and DAT UNPACKER TOOL
I tested them with my antivirus first, then i got it working, the unpacker for what y remember (it's been several months since then).
What you get is directories with numbers and files with numbers too.
some contains lotro translations. But you have to convert them again with the LOCALDATAEXTRACTOR to obtain text files.
The huge problem with this solution is that the first extract all of lotro data, it's long and take a LOT(RO) of disk space.

The other solution is lotro-companion that is extracting lotro's data the same way, but not the translations at current time (i think). But the specific java library source has vanished from internet. And Lotro-companion is a two stepped software, the dev extrat lotro data, convert it to Xml and publish the final software.

So for the two what you looking for are resources id, a non real example is [11200][1120] that point to a specific translation the first will point to english, the second the text it self, with that a [11200 + 1][1120] will point to the deutsche text.

As you can imagine doing that by hand is fastidious and time consuming.
So... I'm trying to automate this. I will just give few details as it's not finished yet and too long of an interesting explanation. So just let say i've coded an additional java library attached to lotro-companion containing a lua interpreter with the same specifications of lotro. And with metalua i parse homeopatix's code like, modify it with translations then rewrite it as it. The missing part is the translations from lotro with is unfortunate...
I've linked my github to my profile, but you need to be mentally ready for stack manipulations...

Hyoss 01-12-2024 03:51 AM

Have you considered looking at the data in https://github.com/LotroCompanion/lotro-data ? Way way more has been datamined and unpacked since these old tools were made available.

gilzon 01-12-2024 08:55 AM

More or less yes, but it's all the data used by lotro-companion item, bestiary etc...
what i'm looking for are console messages and if i'm lucky combat logs templates. Parsed by plugins analyzing console events.

if you take a look at PrimePlugins\RaidTools\Alerts\BaseChatData.lua there the well know "Fry to a crisp!" and it's not present in lotro-data.
It's totally unuseful data for lotro-companion.
And looking at this as a translation point of view it's easier to use one long list of text and searching for occurrences, structured data is more complicated to process.

But yea i'm quite too focused on my most annoying problem, a list of translations sources might be
- Other plugins
- lotro-companion translation
- lotro-data
- google translate web or the api


All times are GMT -5. The time now is 02:30 AM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI