Translations:Modding:Content Tutorial Simple Block/29/en

From Vintage Story Wiki
Revision as of 13:13, 28 March 2024 by FuzzyBot (talk | contribs) (Importing a new version from external source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Renaming the Block

Currently, every instance of the block is called 'simpleblock:block-simplegoldblock'. To fix this, you need to add an entry to the lang file. Open up the provided en.json language file, found in assets/simpleblock/lang. This is what the file should look like:

{
	"": ""
}

On the left is the translation key, and on the right is the translated string. In this case, the translation key is 'block-simplegoldblock'. Note that this is how the game is currently displaying the name, minus the mod domain prefix. The translated string for this should be 'Simple Gold Block'.

{
	"block-simplegoldblock": "Simple Gold Block"
}

To speed up testing, if you still have Vintage Story open, you can use the command '.reload lang' to reload all lang files. Hovering over your block should show that the lang file has taken effect.