Arqade Asked by hf02 on March 30, 2021
What format are the 1.8 .lang files? Are they proprietary?
Here is a snippet of one:
language.name=English
language.region=US
language.code=en_US
translation.test.none=Hello, world!
translation.test.complex=Prefix, %s%2$s again %s and %1$s lastly %s and also %1$s again!
translation.test.escape=%%s %%%s %%%%s %%%%%s
translation.test.invalid=hi %
translation.test.invalid2=hi % s
translation.test.args=%s %s
translation.test.world=world
.lang
files are stored as a giant JSON dictionary object of keys and values, being the 'key' is a particular translation string identifier, and the value being the text translated.
Here's a snippet from minecraft/lang/en_gb.json
:
{
"addServer.add": "Done",
"addServer.enterIp": "Server Address",
"addServer.enterName": "Server Name",
"addServer.hideAddress": "Hide Address",
"addServer.resourcePack": "Server Resource Packs",
...
"tutorial.punch_tree.description": "Hold down %s",
"tutorial.punch_tree.title": "Destroy the tree",
"tutorial.socialInteractions.description": "Press %s to open",
"tutorial.socialInteractions.title": "Social Interactions"
}
They used to be stored a giant key-value list seperated by the =
(equal sign).
addServer.add=Done
addServer.enterIp=Server Address
addServer.enterName=Server Name
addServer.hideAddress=Hide Address
...
tutorial.socialInteractions.description=Press %s to open
tutorial.socialInteractions.title=Social Interactions
If you need a template to start with, go to:
%appdata%.minecraftassetsobjectsbdbdd551782a0ef71c2b04537fc9cad75abbbf7cba
And rename it to en_gb.json
so that it is recognized by other programs. Note that the lang.json
files change hashes between versions as Mojang adds/removes/changes some strings. The hash above is correct as of 1.16 (Mar 07, 2021).
Just in case: ...
denotes a snippet cut because the whole file is too big to be pasted.
Answered by aytimothy on March 30, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP