Translation API (Core Mod)

⭐ ⭐ (417 endorsements) 📥 20,529 downloads 📌 v1.01 📅 4/12/2021
⚪ Last updated 2021

By MegaPiggy · Utilities

⬇ Download Mod Source: Nexus Mods ↗ 📅 Updated: 5/1/2021 📅 Created: 4/12/2021

🔍 Analysis

  • 👍 2.0% endorsement rate — high engagement, a strong quality signal
  • 🏆 #13 of 31 Utilities mods in this game by downloads

📋 About This Mod

This is NOT a mod. This is a utility that will be used by mods to add translations of in-game text for all supported languages.

This is NOT a mod.

This is a utility that will be used by mods to add translations for all supported languages to their mods.

To use this API while creating your mod, you'll need to add it as a reference just like you would with the Assembly_CSharp.dll or SRML.dll files. And then add a

using TranslationAPI;

Near the top of whatever script is gonna use the API.

And you'll also need to add this to your

modinfo.json

"dependencies": [

"translationapi 1. 0"

"load_after": [

"translationapi"

-----------------------------------------------------------------------------------------------------------------------------

There are 2 commands in this API to help you copy translations.

copytranslation

: allows you to copy in game translation to your clipboard.

dumpbundle

: dumps a bundle (group of translations) to your SlimeRancher_Data folder.

-----------------------------------------------------------------------------------------------------------------------------

There are 3 ways to register translations.

The first way:

This is similar to how SRML would do it. Except, that you'd need to figure out the bundle and key to each translation yourself.

TranslationUtil. RegisterTranslation(MessageDirector. Lang. EN, "actor", "l.random_slime", "Random Slime");

Below is the same as above

TranslationUtil. RegisterActorTranslation(MessageDirector. Lang. EN, "l.random_slime", "Random Slime");

-----------------------------------------------------------------------------------------------------------------------------

The second way:

For this way, you need to create files that have the translations in them.

You'll need to create a folder in your mod and name it "Translations". Then you'll need to create files with the names of the languages you want to add and put them in that folder.

File Names For Each Language:

German => de.yaml

English => en.yaml

Spanish => es.yaml

French => fr.yaml

Japanese => ja.yaml

Korean => ko.yaml

Portuguese => pt.yaml

Russian => ru.yaml

Swedish => sv.yaml

Chinese => zh.yaml

The files should have the .yaml extension, and their 

Build Action

property should be set to

Embedded Resource

.

 

The insides of these files contains the translations the format for each translation should be

bundle:key: value

Here are some examples

actor:l.random_plort: Random Plort

actor:l.random_slime: Random Slime

pedia:t.random_slime_entry: Random Slime

pedia:m.intro.random_slime_entry: "Very Random\nStuff"

The files should look like this if you are in visual studio

Now that we have all that done you can register your assembly in load.

TranslationUtil. RegisterAssembly(Assembly. GetExecutingAssembly());

-----------------------------------------------------------------------------------------------------------------------------

The third way:

Not considered an actual way. But it is a useful little tool. It allows you to copy from a translation to another one.

Like this food group for example. It copies the Tarr Foodgroup Info. So the nontarrgoldslime food group will be displayed the same as the tarr foodgroup.

TranslationUtil. RegisterRedirect("ui", "m.foodgroup.tarr", "ui", "m.foodgroup.nontarrgold_slimes");

📊 Mod Details

Game
Slimerancher Mods
Author
MegaPiggy
Version
1.01
Downloads
20,529
Endorsements
417
Category
Utilities
Created
4/12/2021
Updated
5/1/2021
Tags
English, French, German, Japanese, Spanish, Russian, Modder's Resource, Non-Playable Resource, Utilities for Modders, Other languages

🔧 How to Install Slime Rancher Mods

Install via a mod manager (Vortex or Mod Organizer 2). Most mods drop into the game folder.

📖 Full step-by-step install guide for Slime Rancher →

Visit the official mod page for specific installation instructions for this mod.

🎮 Need cheat codes or console commands? Check ur gaming wiki for Slime Rancher commands, item IDs, and more.

Keep browsing — more Slime Rancher mods await

📋 All Slime Rancher Mods 🏆 Top 25 📂 More Utilities 👤 More by MegaPiggy 🔎 Similar Mods 🌐 Best Utilities (All Games) 🔀 Check Compatibility ⚖️ Compare Mods 🆕 New Mods