TranslateWithBing - Translates chat using Microsoft Azure

This is a discussion topic for the Ore project, TranslateWithBing. View the full project on Ore for downloads and more information.

This is a chat translation service that ties into Microsoft Azure Data Translation Service, aka Bing Translate.


  • /language <PlayerOrSource> <Language> - Sets a language for a user, overrides default minecraft locale for translator.
  • /reloadtranslate - reloads the configuration file.


  • translate.command.languageoverride - Permission to use the /language command, defaults to true for User role.
  • translate.command.reload - Permission to use /reloadtranslate command. defaults to true for Admin role.

Lets you disable the warning sent to users that translations may not be 100% accurate.

SendWarningOnJoin = true

In order to use it just copy it to the mods directory on your Sponge server, and sign up for an API key. (Free tier is 2Million characters a month).

On first run it will generate a config file, which must be filled out with the ClientID and ClientSecret you obtained from Microsofts Data Azure Marketplace.


#Get your Client ID and Client Secret by signing up for Microsofts Translator Service, Free tier = 2M characters a month.
ClientID = "MySpongeyServer"
ClientSecret = "IDQy/Ud4iX7YtRuifXBzh+osnUwsLLk/2KvmQljX21Y="

API Key:

Forums: TranslateWithBing[1.2.0] [API 4.1]




New config option: SendWarningOnJoin = true
Added Sponge reload command support.
Updated for SpongeAPI 4.1.0
Now built for sponge 4.x
Added a command to reload the config, now tells user the error if an error occurred while setting their language.
Fixed an issue where TranslateWithBing was ignoring the players override language setting with the command.
Updated minor version, no features added, but it now no longer needs the libraries it uses on the classpath as it includes them for you in the jar.

1 Like

A few things:

  • Don’t use getResource; use the Asset API.
  • When a command fails, you should throw CommandException instead of returning CommandResult.empty().
  • The GameReloadEvent is preferred over a custom reload command.
  • The HOCON spec defines key naming conventions as being all lowercase with hyphens for spaces.
  • registerGettersAndSetters in AbstractData needs to be manually called (it’s not done for you).
  • If your DataManipulatorBuilder extends AbstractDataBuilder, then versioning is done for you.

I think I might be aware of the AssetAPI. The code predates the AssetAPI being included.

I don’t think we should be using exceptions for what should be handled as control flow, exceptions should be used for exceptional circumstances.

I am using the GameReloadEvent, the reload command is legacy due to already containing it in a previous version.

The code in TranslateWithBing pre-dates AbstractDataBuilder doing this.If I ever need versioning I’ll think about migrating it.

I honestly couldn’t care less for HOCON key naming conventions, and I’m not changing it now as it would potentially cause headaches for existing users, not to mention cluttering code over changing the case.

It’s working at the moment, and I am unable to see this mentioned in the javadocs. I’d love you to link to a source, or show me exactly what this is preventing from working before I start making changes to something that works as is.