Tales of Maj'Eyal

Tales of Maj'Eyal

View Stats:
Cornix Jun 5, 2018 @ 7:51am
How to translate ToME?
I do have a lot of spare time lately, so I would like to translate tome into my native language (german). How is it done? How are mods like these made? I know it's probably tons of work, but I am ready to do it if someone explains it to me.
< >
Showing 1-7 of 7 comments
Samseng Yik Jun 5, 2018 @ 9:38am 
There is a work shop sub forum.
Try there see anyone done before or not.

Million of words. Good luck
Dekar Jun 16, 2018 @ 1:55am 
ToME does not really support translations, but it is possible to make them. They will require a high amount of maintance after patches.
Basically, you create an addon that replaces ALL files with displayed text with new files that have localized text.
For starters, you unpack the tome module .team file, which is actually just a .zip.
Then you edit the .lua files with any text editor to localize them.
Finally, you create a new addon that replaces the original files with your new files.

The biggest problem is, since you are overwriting files, any patch to the game has a high potential to break the addon. The updates will be reversed by the addon, and you have to check what files were updated in the patch and then update your localized files.

The wiki has some information on modding at the bottom of the page: https://te4.org/wiki/Tales_of_Maj%27Eyal_Wiki
You do not need the source and to compile the game, so you can skip the first the first two parts there. Most other parts there are probably also not needed for a translation.
If you want to see how an addon works, you can download any addon from https://te4.org/addons/tome and also open it like any .zip file to see the file structure/example files.
For more help you can visit our IRC channel, but dont expect fast responses to your questions. :P

Jack B Nymble Mar 24, 2019 @ 3:53pm 
An alternative way of tackling this would be to implement gettext or something similar. Gettext general philosophy is the lookup key for a translation is the default language (English) which meshes well with the current setup. Would just require a special gettext function to (usually _) to precede the strings. If the language is not English, it'll perform a lookup. If the string has no translation, or the text has changed, the key (English) will be returned instead (Which allows additional content to be published without worrying about translations being unavailable).

Unfortunately there doesn't seem to be a native gettext module for Lua which means using a thirdparty or rolling your own. There's also translation tables but given the sheer amount of text in this game, going with compiled .mo files would probably better for the memory you save.
Zuzia Dec 25, 2020 @ 3:48pm 
Is some posibility to add all Tales of Maj'Eyal langage text to 1 big file and create UI to translate all side by side?,

like in table:



ENG lang__________________PL lang
New game_________________Nowa gra
Load game________________Wczytaj grę
You must go to the north________Musisz iść na północ

This way all language can be easy translated from orginal english lang file and added to the game.


Last edited by Zuzia; Dec 25, 2020 @ 3:55pm
Jack B Nymble Dec 25, 2020 @ 6:29pm 
You're lucky Zuzia. Last time I commented here TOME did not appear to support translations. Apparently I've missed something since Chinese is now supported. I dug around the Tome file and there appear to be translation files with most/all of the game text. It would've been nice if someone had responded to one of these threads about the change but alas. TOME could probably support a translation editor in game but since you're asking I guess Dark God hasn't made that a reality yet.

I don't know how translation works in TOME. But if you're willing to experiment and not afraid of mucking around with the game files I'll give you my best guess as to how translations work. That said, this might not work as I describe. You can always go to the TOME forums if you want an official answer.

Navigate to this path using file explorer

C:\Program Files (x86)\Steam\steamapps\common\TalesMajEyal\game\modules

You'll find a file named "tome.team", this is actually a zip file. Make two copies of it. Name the first copy "tome.team.old". That is your game backup, if something breaks, you remove the extension and replace the broken version. Rename the second copy "tome.zip". Unzip "tome.zip" and navigate to "tome/data/locales". "locales" contains the translation files. Since Chinese is officially supported, you should work off one of those files. Interesting to see Japanese and Korean in there, guess those are works in progress.

Rename the Chinese file to "pl_PL.lua", open the file with a text editor and make your translations. When you're done translating you'll need to make a copy of "pl_PL.lua" named "zh_hans.lua" or "zh_hant.lua" and select the appropriate Chinese language version from the game to load your translation file. Tales language support is likely hardcoded instead of inferred. Rezip the "tome" folder and rename it to "tome.team" replacing the existing copy. Restart the game and hopefully your translations will be in place. It's probably a good idea to find a string of text that occurs early in the game to ensure this works the way I think it does before you translate the whole thing.

Good luck
Last edited by Jack B Nymble; Dec 25, 2020 @ 7:01pm
ThatWhichIsMe Dec 28, 2020 @ 5:04pm 
You'll probably be interested in the new localization support[te4.org] in the 1.7 game engine. AIUI, writing a translation for the game basically boils down to making an addon that contains the necessary translation files and a hook callback that lets the game know about your translation.
Jack B Nymble Dec 29, 2020 @ 8:44pm 
@ThatWhichIsMe

Interesting, thanks for sharing! So translation files go into myaddon/data/locales and the hook goes into myaddon/hooks/load.lua

He didn't say if there's a pre-cooked translation file to work off but the wiki below suggests the file is built using some tooling that'll be available in future versions of addon-dev. Easiest thing for lay people though is prob just copying the Chinese translation file into their addon and working on it there.
https://te4.org/wiki/Translation
< >
Showing 1-7 of 7 comments
Per page: 1530 50

Date Posted: Jun 5, 2018 @ 7:51am
Posts: 7