- Once you've edited the local file and finished your translation... how do you get that data back into the game in a way that the game will play using the updated translation?
- How much do you need to worry about the length of the original text verses the new translated text?
(I'm thinking of buttons, etc that might say "Hi"
and the translation is "Greetings"
- where the translation is too big or too small for the area definited within Unity).
re: putting the translation back into the game
The game will always need bepinex to do the realtime string replacement. It just works faster than you can notice if all the translation strings are already "cached" in the local text file.
AFAIK there i no way to add a translation back into the original game files. Bepinex works by intercepting the relevant method calls in unity C# code and substitutes the translated string into the buffer just before display. It doesn't modify the game code itself.
BepinEx will pickup any files in the relevant folder (
<game root>\BepInEx\Translation\en\Text
) and look to match the "source" strings, and the replace the in game text with the string after the "=" symbol. It looks like this:
Code:
残りハート=Remaining hearts
千田 美音=Mion Chida
絶頂=Climax
To give someone else the manual translation, you include it in the game archive in the "BepInEx\Translation\en\Text" folder (or just provide the text file with instructions on where to put it.
re: test length/display size
Depending on the game, the length of text can be an issue. It's possible to configure bepinex to shrink the font size so the new string is shown no longer than the original. But that obviously has limits before it becomes unreadable.
I found it was not often an issue with the story text as the dialogue box was generally large enough. However, UI buttons and similar were sometimes a real challenge to find translations that would fit.