How does the "i18n" work?

How does the “i18n” work?

1 Like

What do you mean exactly: how the technical details behind it works, or how to use it?

I think I just figured it out, it uses the locale files right?

Yep, it’s pretty straightforward in that it searches for a piece of text in that file using a path (the one supplied from using "i18n(mod_name:text_path)").

Also, you should make sure to add

   "default_locale" : "en"

inside your manifest to enable your own locale file (if you have one that is).

1 Like

I was wondering, for reference sake, where these values are stored. I have been looking at items such as the recurve bow and have followed the paths, but there are no apparent files for said values to be stored (I go through “stonehearth > entities > weapons > recurve_bow” to find a file that seems like it would hold the value for “display_name” but there are only .json, .png, and .qb files).

In the locale file that Drotten mentioned. The text path also appears inside the locale file, to specify which bit goes to what doodad.