Translate the GUI
Moderator: Moderators
Translate the GUI
I want to translate the GUI into french but I don't know how to do it. Does anybody know the best way to find the text files to translate in the source-code ?
Re: Translate the GUI
nice idea, the gui could be translated into some languages (if its simple possible)
Re: Translate the GUI
which gui? the lobby or in game?
Ingame you are going to have a problem as the game has no language support and as modders several of us are starting to use custom gui elements that offer little language support and will not be able to support it as the engine has no way of storing any language support and we would have to build it ourselves.
Ingame you are going to have a problem as the game has no language support and as modders several of us are starting to use custom gui elements that offer little language support and will not be able to support it as the engine has no way of storing any language support and we would have to build it ourselves.
- BrainDamage
- Lobby Developer
- Posts: 1164
- Joined: 25 Sep 2006, 13:56
Re: Translate the GUI
I recall trepan mentioning a lua lib/api to allow localization, I am not sure if the work got committed / is documented, but might be worth a shotsmoth wrote: Ingame you are going to have a problem as the game has no language support and as modders several of us are starting to use custom gui elements that offer little language support and will not be able to support it as the engine has no way of storing any language support and we would have to build it ourselves.
Re: Translate the GUI
like I said, if the games were to have any language support, we would have to add it. Spring isn't like ta where we can have alternate language descriptions esp with lua stuff going on like custom econs. It has to be added by each modder to their project.
Re: Translate the GUI
Well... on our side (i.e., game designers)... we have all of the things needed for localization, the only trick is providing UI elements to allow users to select their local language, and a translation of all terms provided based on that.
It's not impossible, just difficult, and something that would require a fairly large amount of time. There aren't any real changes that need to be made in Spring itself, tbh.
It's not impossible, just difficult, and something that would require a fairly large amount of time. There aren't any real changes that need to be made in Spring itself, tbh.
Re: Translate the GUI
Look at the top of layout.lua. IIRC, the now defunct
gui_tooltips.lua also used the same mechanism (or
at least the one on my machine did).
gui_tooltips.lua also used the same mechanism (or
at least the one on my machine did).
Re: Translate the GUI
Ah, so...
...gives us a way to know when players have selected a new language. Cool, that makes things relatively simple then, it's "just" a matter of having the time to translate all of the text, and displaying it using a non-crappy UI.
Code: Select all
local langSuffix = Spring.GetConfigString('Language', 'fr')
local l10nName = 'L10N/commands_' .. langSuffix .. '.lua'
local success, translations = pcall(VFS.Include, l10nName)
if (not success) then
translations = nil
end
Re: Translate the GUI
hmm...
i don't know...
it all really seems way too much work (if not the coding, then the translating) for the outcome. i mean.. lobbies: ok
but with the rest, it are things like move, shoot and so on. every computer gamer today knows these words. we would be translating widgets that are used by maybe a hundred players, of which maybe 5 would profit from having it in an other language, and 4 of those speak a strange siberian language (not french or german or anything else that the widget is likely to get translated to).
sure, it would be nice, but there are many other things that could be done with this time which are much more interesting.
it is your time, sadly
aehhh... though
i don't know...
it all really seems way too much work (if not the coding, then the translating) for the outcome. i mean.. lobbies: ok
but with the rest, it are things like move, shoot and so on. every computer gamer today knows these words. we would be translating widgets that are used by maybe a hundred players, of which maybe 5 would profit from having it in an other language, and 4 of those speak a strange siberian language (not french or german or anything else that the widget is likely to get translated to).
sure, it would be nice, but there are many other things that could be done with this time which are much more interesting.
it is your time, sadly
aehhh... though