Java wrapper for the Microsoft Translator API
Latest commit 1d74ff3 Jul 15, 2017 @boatmeme committed on GitHub Update


Provides a Java wrapper around the Microsoft Translator API aka Bing Translator.

Created in an attempt to fill the void left by the deprecation of the Google Translate API announced on May 26, 2011 and scheduled for permanent shutdown on December 1, 2011.

In an effort to lessen the impact on Java developers that have previously integrated the Google Translate API into their applications, it is my goal to mimic the code structure, naming conventions, functionality, and usage patterns of the excellent and widely used google-api-translate-java by Rich Midwinter.


  • Java 1.5 or greater
  • A Windows Azure Marketplace Client ID and Client Secret - Documentation

Please note: If you signed up for a Bing Developer Key after March 31, 2012, you will not be able to use your App Id with this API. Please visit the aforementioned documentation link


Download the latest JAR with Dependencies

import com.memetix.mst.language.Language;
import com.memetix.mst.translate.Translate;

public class Main {
  public static void main(String[] args) throws Exception {
    // Set your Windows Azure Marketplace client info - See
    Translate.setClientId(/* Enter your Windows Azure Client Id here */);
    Translate.setClientSecret(/* Enter your Windows Azure Client Secret here */);

    String translatedText = Translate.execute("Bonjour le monde", Language.FRENCH, Language.ENGLISH);


More Examples

I've posted some examples to the SVN repository on Google Code. The examples include:


For those using Maven 2 to manage their project dependencies, the microsoft-translator-java-api is distributed via the Maven Central repository. Simply include the following in your POM.xml to use the Microsoft Translator Java API:


Or, if you're feeling adventurous, help us test the next version by adding the latest SNAPSHOT to your POM.xml:


The SNAPSHOT is hosted at the Sonatype OSS Snapshot repository, so if you do not already have it in your repository list, you will need to add this also

    <name>Sonatype Open Source maven snapshot repo</name>

Support on Beerpay

Contributions to the 🍻 fund are much appreciated!

Beerpay Beerpay


The microsoft-translator-java-api is licensed under the Apache License, Version 2.0

 * Copyright 2011-2015 Jonathan Griggs.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.

Please note that while this license does not distinguish between personal, internal or commercial use, the Microsoft Translator API itself does in fact make this distinction.

If you intend to use the Microsoft Translator API for commercial or high volume purposes, you would need to sign a commercial license agreement and provide your appID to the Microsoft Translator team. For more details contact This allows the Microsoft Translator team to better tune the service to the needs of our many partners, and avoid abuse.