Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method for instant translation #17

Open
BrunoMine opened this issue May 9, 2017 · 4 comments
Open

Method for instant translation #17

BrunoMine opened this issue May 9, 2017 · 4 comments

Comments

@BrunoMine
Copy link
Contributor

I am planning to use internationalization on bilingual servers.
I plan to use a function to return a translated string.
An example:
GetS("pt_br", "My great string number @1, @2", val1, val2)
I believe this should already exist in intllib. But I do not know if it's okay to use this out of intllib. So this can be a doubt or a suggestion.
Thank you in advance!

@BrunoMine
Copy link
Contributor Author

I was discussing with some friends, it will be necessary for the method to return an alternative string (untranslated)

@ShadowNinja
Copy link
Member

This isn't really possible. Things like item definitions are global, so you'd have to do something like redefining a node in an on_preconnect call for a particular player -- and then revert it after they've finished loading item definitions. You'd also have to block any other players from joining at the same time as they'd get the same translations. This means that you can't translate descriptions. There's a similar problem with info texts and formspecs in node metadata.

The only reasonable way to support more than one language on a single Minetest server is through engine support.

@BrunoMine
Copy link
Contributor Author

I understand, but the main goal is to translate formspec and chat messages.

@BrunoMine
Copy link
Contributor Author

BrunoMine commented Jul 13, 2017

I'll use this in adventure quests, wiki and chat mensages alert for server players. It will greatly facilitate the gameplay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants