# Stranslation - Stonehearth Translation Toolkit

**URL:** <https://discourse.stonehearth.net/t/stranslation-stonehearth-translation-toolkit/8768>\
**Category:** Translation and Localization\
**Created:** [November 25, 2014, 3:12am UTC](https://discourse.stonehearth.net/t/stranslation-stonehearth-translation-toolkit/8768 "2014-11-25T03:12:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zpr](https://avatars.discourse-cdn.com/v4/letter/z/958977/32.png) [@zpr](https://discourse.stonehearth.net/u/zpr)\
**Post date:** [November 25, 2014, 3:12am UTC](https://discourse.stonehearth.net/t/stranslation-stonehearth-translation-toolkit/8768/1 "2014-11-25T03:12:04Z")

</div>

#Stonehearth Translation Toolkit - JSON \<–\> CSV  
**This tool enables you to do translations in a Sheet/Excel with an easy import and exportation process**

##Screenshots  
[stranslation - Album on Imgur](http://imgur.com/a/wWRLU)

* * *

##Disclaimer: This tool was only tested in Google Drive Sheets  
[![](http://i.imgur.com/cIk37Aw.jpg) ](http://i.imgur.com/cIk37Aw.jpg)

###JSON  
Stonehearth main language FILE its written in a special format that is commonly used for programming. JSON. It’s not a programming language but a _easy human way_ to write and read data.

###CSV  
CSV(comma-separated values) its other way to format data in a “tabular” manner. _aka_ make tables in a plain text file.  
You can use CSV in programs such as: **Google Drive Sheets, Microsoft Excel** or other program that recognizes CSV extension

###This Tool was created to facilitate the translation process.  
This Tool enables you to export from JSON to CSV and CSV to JSON.  
You can translate Official Stonehearth in-game phrases in Google Drive Sheets and then export from your CSV to JSON files, easily. **By using Google Drive Sheets you can share your file with others and translate TOGETHER !!**

* * *

# stranslation app has 3 tasks:

##- Create the default CSV  
This is your first task you will **execute**. This task will create the default csv from the official language file (json) each its located at **Stonehearth/mods/stonehearth.smod/stonehearth/locales/en.json**

After creating the file and put it in Google Drive you will see the following **template sheet**  
[![](http://i.imgur.com/FaLpxba.jpg) ](http://i.imgur.com/FaLpxba.jpg)

**In this sheet you can add columns for one or many languages as you please**. Example:  
[http://i.imgur.com/nkH1xLB.jpg](http://i.imgur.com/nkH1xLB.jpg)

- [CLICK HERE to check a live Google Drive example](https://docs.google.com/spreadsheets/d/1-AWmSVw13TPR7pjdFEblPRtyxfIYXyZSAs6ejaAWxik/edit?usp=sharing)

- [CLICK HERE to get aditional information. There are two columns you cannot edit when using app’s CSV template](https://docs.google.com/spreadsheets/d/1pfJwdVZj_CQG60scldOYZqE--VipN04ao-OesKKPMP0/edit?usp=sharing)

* * *

##- Export CSV to JSON  
After done editing or you just want to test it out **you have to download your Google Drive Sheet as a CSV file** [LIKE THIS](http://i.imgur.com/Csk05wU.jpg)

After puting your file in a specific folder you will be able to export your languages to JSON files, **individually**.  
**All CSV files in that specific folder will be export if you execute this task** (name of CSV files does not matter)  
Example:  
[![](http://i.imgur.com/o7gAsUD.jpg) ](http://i.imgur.com/o7gAsUD.jpg)

* * *

##- Update CSVs  
This task updates all phrases from your CSV files. This means if Radiant changes any phrase ( **delete, rename phrase ID, change description or change order** ) this task will automatically update your CSV, easily.

## **Example:**  
Lets imagine we are on **Alpha 5** and these are the phrases in-game at the moment:  
[![](http://i.imgur.com/aHKRPe6.jpg) ](http://i.imgur.com/aHKRPe6.jpg)  
you ran the **Create Default CSV** task and translated those words in Google Drive  
[![](http://i.imgur.com/noOT29D.jpg) ](http://i.imgur.com/noOT29D.jpg)

**Alpha 6** arrives and the official language JSON was changed by Radiant:  
[![](http://i.imgur.com/Qpf2oXH.jpg) ](http://i.imgur.com/Qpf2oXH.jpg)

**Lets analyse the words:**  
[![](http://i.imgur.com/4m3DKLg.jpg) ](http://i.imgur.com/4m3DKLg.jpg)

**Executing this task** you will get the following output:  
[![](http://i.imgur.com/0PGoyGC.jpg) ](http://i.imgur.com/0PGoyGC.jpg)

**{{UPDATED}}** and **{{NEW}}** words will **VISUALLY** warn the translator which ones were updated or added. He/She just need to update those words and that’s it.

## **REAL comparison between Alpha 5 & Alpha 6**  
[Official Comparison between Alpha 5 and Alpha 6 (Google Drive)](https://docs.google.com/spreadsheets/d/1HL292napTxXhx-N984bRotDPB6PbD1n3cAmHoU6-0R4/edit?usp=sharing)

* * *

#Information

- [The first two columns that comes by default cannot be changed. Please check this link.](https://docs.google.com/spreadsheets/d/1pfJwdVZj_CQG60scldOYZqE--VipN04ao-OesKKPMP0/edit?usp=sharing)
- Always backup your CSV

* * *

#In-game quick example  
This tool does not modify anything in your game directory. I’ve done it manually for demonstration.  
[http://i.imgur.com/nHaCbAo.jpg](http://i.imgur.com/nHaCbAo.jpg)  
[http://i.imgur.com/gYZgPa7.jpg](http://i.imgur.com/gYZgPa7.jpg)

* * *

#DOWNLOAD LASTEST BUILD v0.0.1  
**The tool will notify you if a new version is available**  
If you run for the first time and a windows firewall alert popups, hit _‘allow access’_. Actually, even if you cancel the app will run normally I believe)

> **[zprjk/stonehearth-translation-toolkit](https://github.com/zprjk/stonehearth-translation-toolkit/releases/tag/v0.0.1)**
>
> stonehearth-translation-toolkit - A helper for Stonehearth translation community

_Run stranslation.exe_  
[![](http://i.imgur.com/qHd2jOp.jpg) ](http://i.imgur.com/qHd2jOp.jpg)

* * *

#Git Repository (source code)

> **[zprjk/stonehearth-translation-toolkit](https://github.com/zprjk/stonehearth-translation-toolkit)**
>
> stonehearth-translation-toolkit - A helper for Stonehearth translation community

* * *

---

<div class="post-metadata">

**Author:** ![zpr](https://avatars.discourse-cdn.com/v4/letter/z/958977/32.png) [@zpr](https://discourse.stonehearth.net/u/zpr)\
**Post date:** [November 25, 2014, 3:13am UTC](https://discourse.stonehearth.net/t/stranslation-stonehearth-translation-toolkit/8768/2 "2014-11-25T03:13:04Z")

</div>

\_\_\_\_\_\_\_\_\_ _reserved_

---

<div class="post-metadata">

**Author:** ![zpr](https://avatars.discourse-cdn.com/v4/letter/z/958977/32.png) [@zpr](https://discourse.stonehearth.net/u/zpr)\
**Post date:** [November 25, 2014, 3:49am UTC](https://discourse.stonehearth.net/t/stranslation-stonehearth-translation-toolkit/8768/3 "2014-11-25T03:49:12Z")

</div>

Added Git Repository and Download links

---

<div class="post-metadata">

**Author:** ![zpr](https://avatars.discourse-cdn.com/v4/letter/z/958977/32.png) [@zpr](https://discourse.stonehearth.net/u/zpr)\
**Post date:** [November 25, 2014, 2:50pm UTC](https://discourse.stonehearth.net/t/stranslation-stonehearth-translation-toolkit/8768/4 "2014-11-25T14:50:58Z")

</div>

**Alpha 6 has arrived**. Here’s a Comparison between Alpha 5 & Alpha 6:  
[Official Comparison between Alpha 5 and Alpha 6 (Google Drive)](https://docs.google.com/spreadsheets/d/1HL292napTxXhx-N984bRotDPB6PbD1n3cAmHoU6-0R4/edit?usp=sharing)
