ModsJava
McTranslate++
Java mod listed for Minecraft 1.8–1.12. Download on the author's site.
⬇ Download on SpigotAbout
McTranslate++ works as a library that allows plugin developers to easily translate messages with their plugins without having to actually call any real translation service in their own code, and prevents extra leaks of Google API keys into other plugins, as you only have to set it once with this plugin.
Video Tutorial
Note: The tutorial is outdated, and you no longer need the "mctranslateplusplus_lib" folder for the plugin to run! (The jar is now also renamed to just "mctranslate.jar" as well!
)
User Setup
For use with a Minecraft server running CraftBukkit/Bukkit/Spigot/PaperSpigot
Steps
1. Drag the 'mctranslate.jar' into your '/plugins' folder.
2. Within the 'config.yml' located in the McTranslatePlusPlus plugin folder, change the value of the Google API key to whatever your Google API Key is. A video is located at the bottom of the page if you need help creating one.
3. After launching the server once, under 'translate.api_key'an API key will be provided. Provide this to other plugins that will use translation that hook into this plugin.
Note: If the 'config.yml' file fails to load or the 'api_key' cannot be loaded, the API key will be reset, and you will have to provide the new credentials to all the plugins that utilize the plugin's libraries.
Code Usage (With a Minecraft Server)
Steps
1. Add the jar for this artifact into your class path.
2. Store an object (Preferably in your Main.java/App.java) with the Object type 'McTranslate' (Must be accessible wherever you want to translate any item.) Also create a String called 'api_key' and create a getter and setter for the variable.
4. Declare the function with the plugin and set 'translate' to the new Object.
5. To translate a string on runtime, and not save it to a file, use the method below:
6. To get and set a string for a specific language to your 'lang_FR.yml' file from english for example, use the methods below:
McTranslate++ works as a library that allows plugin developers to easily translate messages with their plugins without having to actually call any real translation service in their own code, and prevents extra leaks of Google API keys into other plugins, as you only have to set it once with this plugin.
Video Tutorial
Note: The tutorial is outdated, and you no longer need the "mctranslateplusplus_lib" folder for the plugin to run! (The jar is now also renamed to just "mctranslate.jar" as well!
)
User Setup
For use with a Minecraft server running CraftBukkit/Bukkit/Spigot/PaperSpigot
Steps
1. Drag the 'mctranslate.jar' into your '/plugins' folder.
2. Within the 'config.yml' located in the McTranslatePlusPlus plugin folder, change the value of the Google API key to whatever your Google API Key is. A video is located at the bottom of the page if you need help creating one.
3. After launching the server once, under 'translate.api_key'an API key will be provided. Provide this to other plugins that will use translation that hook into this plugin.
Note: If the 'config.yml' file fails to load or the 'api_key' cannot be loaded, the API key will be reset, and you will have to provide the new credentials to all the plugins that utilize the plugin's libraries.
Code Usage (With a Minecraft Server)
Steps
1. Add the jar for this artifact into your class path.
2. Store an object (Preferably in your Main.java/App.java) with the Object type 'McTranslate' (Must be accessible wherever you want to translate any item.) Also create a String called 'api_key' and create a getter and setter for the variable.
Code (Text):
public static McTranslate translate;
private String api_key;
private String api_key;
Code (Text):
translate = new McTranslate(this.getPlugin(), this.getApiKey());
Code (Text):
translate.translateRuntime(String message, McLang source, McLang target);
Code (Text):
translate.translateToFile("Messages.hello", "Hello", McLang.EN, McLang.FR);
Output in file -> Messages.hello : Bonjour
`translate.getTranslationFromFile("Messages.hello", McLang.FR);
Returns -> "Bonjour" as String
Output in file -> Messages.hello : Bonjour
`translate.getTranslationFromFile("Messages.hello", McLang.FR);
Returns -> "Bonjour" as String
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.8, 1.9, 1.10
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
McTranslate++ is a free Minecraft Java mod. Compatible with Minecraft 1.8, 1.9, 1.10, 1.11 and newer. Downloaded 1,050 times (via Spigot). Download it and open it directly in the game.