Page 1 of 1

UserInterface Translate()

Posted: Thu Apr 20, 2023 10:03 am
by Adrian
I read OpenRa Lua documentation now.
https://docs.openra.net/en/release/lua/

And I found a function without description: Translate().
May I ask, what is this?

Re: UserInterface Translate()

Posted: Thu Apr 20, 2023 6:52 pm
by abcdefg30
It is part of the ongoing translation system implementation. You can see translation keys (which are the inputs to this function) and their values (the output of this function) in the "en.ftl" file(s). Our default missions already use this for the English translation.

Re: UserInterface Translate()

Posted: Thu Apr 20, 2023 8:48 pm
by Adrian
It's interesting.

I try to change something in the "en.ftl" file. The text changing in the game too.
What if I (or somebody) create "abcd.ftl" file for abcd language?

Can I choose this language (this file) somewhere in settings?
Or it does not work yet?
Or it does not work this way?

Re: UserInterface Translate()

Posted: Sat Apr 22, 2023 6:00 pm
by abcdefg30
Changing the language is not exposed yet as the translation system is not complete, but in the future you will be able to use new .ftl files for different languages.