Skip to content

Localized Signs

KameiB edited this page Jan 4, 2025 · 3 revisions

Localized Signs

During my localization journey, I found structures made in Recurrent Complex, that had Signs with hardcoded texts (of course).
The structure is as follows:

{
    Text1:  
    {  
        "text": "First Line"
    }  
    Text2:  
    {  
        "text": "Second Line"  
    }  
    Text3:  
    {  
        "text": "Third Line"  
    }  
    Text4:  
    {  
        "text": "Fourth Line"  
    }  
}  

Luckily, Minecraft treats Signs contents as JSON.
Therefore, you can replace the "text" tag with "translate", and its value with a lang key.

Like this:

{
    Text1:  
    {  
        "translate": "sign.my_structure.sign_name.text1"
    }  
    Text2:  
    {  
        "translate": "sign.my_structure.sign_name.text2"  
    }  
    Text3:  
    {  
        "translate": "sign.my_structure.sign_name.text3"  
    }  
    Text4:  
    {  
        "translate": "sign.my_structure.sign_name.text4"  
    }  
}  

Example

image

Try it now with the following command:

/give @p sign 1 0 {BlockEntityTag:{Text1:"{\"translate\":\"entity.Parrot.name\"}",Text2:"{\"translate\":\"entity.Chicken.name\"}",Text3:"{\"translate\":\"entity.Pig.name\"}",Text4:"{\"translate\":\"entity.localizator.KameiB.name\"}"}}  

Important

Even if you don't use all 4 text lines, specify all Text# tags and create the 4 corresponding lang keys!

Case 1
English texts can take more space when translated to Spanish.
Case 2
English may use Text1, Text2 & Text3 tags, but in Japanese it only needs 2.
But the Japanese translator may use Text3 and Text4, so the text is easier to read when the Sign is placed on top of a door, etc.

Clone this wiki locally