Translation of custom libraries
baskham
25 Mar 2018, 11:54As many of you know, I am fiddling around with translating stuff into Danish.
It is progressing very fine thanks to the help of several people here.
But Now I stumbled into something new.
I started looking at ConvLib, which looks very nice indeed.
But There are default responses in the library file.
Like "You wonder what you can talk to ... about "
I could of course just translate the text right there in the library file.
And maybe make a version called ConvLibDanish or something.
This I can manage and it works just fine.
But it seems to be the wrong way.
It should go into the Dansk.aslx.
But if I put the translated version there, it is not being picked up.
I would of course prefer to keep the original ConvLib file intact.
I was hoping it would be possible to specify the order in which various library files were load, because would probably fix it.
But I can't seem to find that.
Is there a way to do this?
mrangel
26 Mar 2018, 15:05I think the accepted way (based on how it's done in other projects; haven't seen it done in Quest) to do this would be to create a modified ConvLib file (if necessary), taking all user-readable text out of the functions and into templates. If it already uses templates, that's great :)
Then create a separate library, ConvLibDansk.aslx, which includes the original ConvLib, and then has translated templates. This means that you can include this one, and get the same core code but with the modified templates; and if ConvLib is updated, a user could use the new ConvLib with the existing language file.
(It would be better if we could have some equivalent of 'compiler macros', so that ConvLib could include ConvLibEnglis, ConvLibDansk, or whatever based on the language setting for your game. But I've not seen anything to indicate that this is possible in the code)