# Where does en.json go in my mod folder if i want to make my mod translation friendly and or structured?

**URL:** <https://discourse.stonehearth.net/t/where-does-en-json-go-in-my-mod-folder-if-i-want-to-make-my-mod-translation-friendly-and-or-structured/34936>\
**Category:** Modding\
**Created:** [April 30, 2018, 10:55am UTC](https://discourse.stonehearth.net/t/where-does-en-json-go-in-my-mod-folder-if-i-want-to-make-my-mod-translation-friendly-and-or-structured/34936 "2018-04-30T10:55:07Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wouter\_Sikkema](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/wouter_sikkema/32/61482_2.png) [@Wouter\_Sikkema](https://discourse.stonehearth.net/u/Wouter_Sikkema)\
**Post date:** [April 30, 2018, 10:55am UTC](https://discourse.stonehearth.net/t/where-does-en-json-go-in-my-mod-folder-if-i-want-to-make-my-mod-translation-friendly-and-or-structured/34936/1 "2018-04-30T10:55:07Z")

</div>

i know the contents could be somethign like

{  
“entities” : {  
“weapons”: {  
“iron\_axe” : {  
“iron\_axe\_ghost” : {  
“display\_name” : “Iron axe”,  
“description” : “a one handed iron axe.”  
}  
}  
}  
}  
}

and then acces is via the right something.something.something, but where does the actual en.json file go? currently dont have acces to stonehearth’s.smod/zip to check because at work…

current best guess:  
Vikingmod/locales/en.json

and then put a mixin in the manifest like  
“stonehearth/locales/en.json” : “file(jobs/locales/en.json)”

---

<div class="post-metadata">

**Author:** ![Wiese2007](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/wiese2007/32/15946_2.png) [@Wiese2007](https://discourse.stonehearth.net/u/Wiese2007)\
**Post date:** [April 30, 2018, 10:58am UTC](https://discourse.stonehearth.net/t/where-does-en-json-go-in-my-mod-folder-if-i-want-to-make-my-mod-translation-friendly-and-or-structured/34936/2 "2018-04-30T10:58:19Z")

</div>

just make a folder locales 😉 and dont forget to add to your manifest “default\_locale” : “en”,

---

<div class="post-metadata">

**Author:** ![Wouter\_Sikkema](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/wouter_sikkema/32/61482_2.png) [@Wouter\_Sikkema](https://discourse.stonehearth.net/u/Wouter_Sikkema)\
**Post date:** [April 30, 2018, 11:00am UTC](https://discourse.stonehearth.net/t/where-does-en-json-go-in-my-mod-folder-if-i-want-to-make-my-mod-translation-friendly-and-or-structured/34936/3 "2018-04-30T11:00:14Z")

</div>

edited with my best guess, something like that 🙂?

---

<div class="post-metadata">

**Author:** ![Moai](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/moai/32/16242_2.png) [@Moai](https://discourse.stonehearth.net/u/Moai)\
**Post date:** [April 30, 2018, 11:33am UTC](https://discourse.stonehearth.net/t/where-does-en-json-go-in-my-mod-folder-if-i-want-to-make-my-mod-translation-friendly-and-or-structured/34936/4 "2018-04-30T11:33:38Z")

</div>

Nope, not quite.

`vikingmod/locales/en.json`

```
{
  "info": {
    "name": "vikingmod",
    "namespace": "vikingmod"
  },
  "default_locale": "en",
  "aliases": {
       ...
    }
}
```

---

<div class="post-metadata">

**Author:** ![Wouter\_Sikkema](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/wouter_sikkema/32/61482_2.png) [@Wouter\_Sikkema](https://discourse.stonehearth.net/u/Wouter_Sikkema)\
**Post date:** [April 30, 2018, 11:51am UTC](https://discourse.stonehearth.net/t/where-does-en-json-go-in-my-mod-folder-if-i-want-to-make-my-mod-translation-friendly-and-or-structured/34936/5 "2018-04-30T11:51:32Z")

</div>

@Moai sorry im not 100% sure i follow you:  
you mean the inside of vikingmod/locales/en.json should be your lines of code?  
and then “…” should be replaced with my snippet from the original post?  
(this stuff:)  
{  
“entities” : {  
“weapons”: {  
“iron\_axe” : {  
“iron\_axe\_ghost” : {  
“display\_name” : “Iron axe”,  
“description” : “a one handed iron axe.”  
}  
}  
}  
}  
}

if i read you correctly? (possibly with one less tier of brackets {} )

---

<div class="post-metadata">

**Author:** ![Moai](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/moai/32/16242_2.png) [@Moai](https://discourse.stonehearth.net/u/Moai)\
**Post date:** [April 30, 2018, 11:53am UTC](https://discourse.stonehearth.net/t/where-does-en-json-go-in-my-mod-folder-if-i-want-to-make-my-mod-translation-friendly-and-or-structured/34936/6 "2018-04-30T11:53:31Z")

</div>

No, that wasn’t what I meant. Have a look at another mod’s `en.json` file to see what it should be structured like. My post shows how to reference a localization file from your manifest. You don’t create an alias for it, you simply include it in the locales folder, and set the `default_locale` to whatever language you were writing for, in your case `en`.

---

<div class="post-metadata">

**Author:** ![Wouter\_Sikkema](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/wouter_sikkema/32/61482_2.png) [@Wouter\_Sikkema](https://discourse.stonehearth.net/u/Wouter_Sikkema)\
**Post date:** [April 30, 2018, 11:57am UTC](https://discourse.stonehearth.net/t/where-does-en-json-go-in-my-mod-folder-if-i-want-to-make-my-mod-translation-friendly-and-or-structured/34936/7 "2018-04-30T11:57:22Z")

</div>

Ah, so you were more refering to the manifest 😛yah i think i have that one correctly already, i was specifically looking for how to structure the inside of a file that keeps the names and descritions of my items\*.  
 ![manifest](https://us1.discourse-cdn.com/flex022/uploads/stonehearth/original/3X/6/5/656bcd66af8a84ba2f09fc11ae4cb7d0d9d7bb85.png)

\*since i dont have steam ready and on a work pc, but there is little to nothing to do at work but i do have notpad++ and my own mod’s folder… thought i’d do some cleanup

pps. this also means i dont have other mods handy, unfortunately.

---

<div class="post-metadata">

**Author:** ![Moai](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/moai/32/16242_2.png) [@Moai](https://discourse.stonehearth.net/u/Moai)\
**Post date:** [April 30, 2018, 12:01pm UTC](https://discourse.stonehearth.net/t/where-does-en-json-go-in-my-mod-folder-if-i-want-to-make-my-mod-translation-friendly-and-or-structured/34936/8 "2018-04-30T12:01:25Z")

</div>

That is indeed not correct. `default_locale` should not be a child of `info`, it needs to be on the same level as `aliases` and `mixintos`. Stonehearth used to pre-generate mods with `default_locale` under info, this was wrong and has been fixed a day or two ago.

As for structuring en.json, here’s a snippet (top part) of my miner’s localization file.

```
{
	"perks": {
		"work_1": {
			"name": "Mining techniques",
			"desc": "This hearthling has learned basic fast mining techniques."
		},
		"inv_1": {
			"name": "Ore bag",
			"desc": "A backpack fitting 2 extra items has been issued to this hearthling."
		},
		"speed_1": {
			"name": "Hurried",
			"desc": "This miner doesn't want to waste any time. Speed increased by 10."
		}...

```

Here’s how I would use these in the code.

```
   "level_data": {
     "1": {
       "perks": [
          {
             "name": "i18n(miner_prof:perks.work_1.name)",
             "description": "i18n(miner_prof:perks.work_1.desc)",
             "type": "set_miner_work"...

```

Didn’t you say you had an unpacked version of all of SH’s files on your work drive as well? That includes a en.json that you can also use as a reference.

---

<div class="post-metadata">

**Author:** ![Wouter\_Sikkema](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/wouter_sikkema/32/61482_2.png) [@Wouter\_Sikkema](https://discourse.stonehearth.net/u/Wouter_Sikkema)\
**Post date:** [April 30, 2018, 12:03pm UTC](https://discourse.stonehearth.net/t/where-does-en-json-go-in-my-mod-folder-if-i-want-to-make-my-mod-translation-friendly-and-or-structured/34936/9 "2018-04-30T12:03:03Z")

</div>

on a usb stick which i used to take along…and forgot ☹ thanks for the share thought, i can probably make some headway with this 🙂

---

<div class="post-metadata">

**Author:** ![Wouter\_Sikkema](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/wouter_sikkema/32/61482_2.png) [@Wouter\_Sikkema](https://discourse.stonehearth.net/u/Wouter_Sikkema)\
**Post date:** [April 30, 2018, 12:37pm UTC](https://discourse.stonehearth.net/t/where-does-en-json-go-in-my-mod-folder-if-i-want-to-make-my-mod-translation-friendly-and-or-structured/34936/10 "2018-04-30T12:37:43Z")

</div>

so far JSONLINT likes it…  
 ![en2](https://us1.discourse-cdn.com/flex022/uploads/stonehearth/original/3X/1/6/16a27d4dc96891d8058dbe3ccb9026689f17e259.png)

---

<div class="post-metadata">

**Author:** ![Wouter\_Sikkema](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/wouter_sikkema/32/61482_2.png) [@Wouter\_Sikkema](https://discourse.stonehearth.net/u/Wouter_Sikkema)\
**Post date:** [April 30, 2018, 2:29pm UTC](https://discourse.stonehearth.net/t/where-does-en-json-go-in-my-mod-folder-if-i-want-to-make-my-mod-translation-friendly-and-or-structured/34936/11 "2018-04-30T14:29:04Z")

</div>

90 lines of code and half my items and their recipes basicly done… if a small mod is already this much work for a language file, i dont want to know the amount for a full translation. god speed to fan translators…

---

<div class="post-metadata">

**Author:** ![Relyss](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/relyss/32/41785_2.png) [@Relyss](https://discourse.stonehearth.net/u/Relyss)\
**Post date:** [April 30, 2018, 2:38pm UTC](https://discourse.stonehearth.net/t/where-does-en-json-go-in-my-mod-folder-if-i-want-to-make-my-mod-translation-friendly-and-or-structured/34936/12 "2018-04-30T14:38:37Z")

</div>

In SHED it’s so easy and fast to add the localization 😥

I’m cringing at how buggy it is right now and how badly it supports the workshop mods. I wish I could fix it myself but alas, I need to help testing performance fixes and multiplayer bugs.

---

<div class="post-metadata">

**Author:** ![Wouter\_Sikkema](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/wouter_sikkema/32/61482_2.png) [@Wouter\_Sikkema](https://discourse.stonehearth.net/u/Wouter_Sikkema)\
**Post date:** [April 30, 2018, 2:41pm UTC](https://discourse.stonehearth.net/t/where-does-en-json-go-in-my-mod-folder-if-i-want-to-make-my-mod-translation-friendly-and-or-structured/34936/13 "2018-04-30T14:41:01Z")

</div>

First things first ;), you can’t fix everything at once @Relyss

---

<div class="post-metadata">

**Author:** ![Moai](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/moai/32/16242_2.png) [@Moai](https://discourse.stonehearth.net/u/Moai)\
**Post date:** [April 30, 2018, 2:48pm UTC](https://discourse.stonehearth.net/t/where-does-en-json-go-in-my-mod-folder-if-i-want-to-make-my-mod-translation-friendly-and-or-structured/34936/14 "2018-04-30T14:48:23Z")

</div>

I didn’t really like localization at first, either, but I’ve come to appreciate it. For one, my only released mod right now supports two languages out of the box, so I was happy that it allowed me to do that. For two, the localization documents provide a convenient storage of all in-game strings, so instead of typing the same thing multiple times when you need information copied over, you can refer to the same localized item. This also makes it trivial to update the names and descriptions of mods that add a large amount of items, like [Yang’s Yings](https://discourse.stonehearth.net/t/mod-yang-cos-mod-making-a24/26986/97?u=moai).

---

<div class="post-metadata">

**Author:** ![Wouter\_Sikkema](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/wouter_sikkema/32/61482_2.png) [@Wouter\_Sikkema](https://discourse.stonehearth.net/u/Wouter_Sikkema)\
**Post date:** [April 30, 2018, 3:19pm UTC](https://discourse.stonehearth.net/t/where-does-en-json-go-in-my-mod-folder-if-i-want-to-make-my-mod-translation-friendly-and-or-structured/34936/15 "2018-04-30T15:19:51Z")

</div>

Yeah the updating is indeed the reason why I want to do it this way aswell. Well that and professional pride 😛  
(god knows I will probably make a typo - somewhere–jsonlint is already a godsend to stop errors caused by those)
