Download:
github: https://github.com/taikedz/minetest-babelfish
ZIP: https://github.com/taikedz/minetest-bab ... master.zip
- * Currently uses Yandex to do the translation because it was the only free API I could get.
* Can be extended to use different web APIs
* Can be used as an API for other mods
* You MUST add babelfish to the `secure.trusted_mods` for it to work, as it makes calls out to the Internet.
- Code: Select all
/babel {player}
* Translates the last message from the specified player to your preferred language
* Only you see the result of this
* /babel mrGibberish
/bblang {language}
* Set your preferred language using a language code
* Default is English
* Currently does not save across server reboots
/bb {language} {sentence}
* Broadcasts a message in the target language (French in this case)
* /bb fr My english sentence
/bmsg {language} {player} {sentence}
* Sends a private message to another player in the target language
* /bmsg es spanishplayer I do not understand you, please use the translation commands
/bbcodes
* List the available language codes
Still to do (if anyone would like to assist, please do!)
- Code: Select all
* Saving language preferences
* Set-lang command for moderators to set a player's language
* requires privs
* Special "persistent translations" call so that a phrase is translated once, and stored for later re-use
* Special command for translating to all players in their preferred languages
* depends on a temp-persistence being implemented
* requires privs - this can easily consume the API quota quickly
* for moderators/admins making announcements