Translate GreatNPC with a resource pack¶
GreatNPC's built-in interface and system messages use Minecraft language resources. English is the default. Language selection belongs to each client; administrators do not choose it through lang.conf.
Pack layout¶
Create a normal resource pack for your Minecraft version and add the language file for your target locale:
Use the locale's lowercase Minecraft code, such as pt_br, es_es or de_de. Start from assets/greatnpc/lang/en_us.json inside the mod JAR to see the actual available keys. A pack can override only the keys it changes; missing entries fall back to the available English resources.
Example pt_br.json:
{
"greatnpc.in_battle": "Você já está em uma batalha.",
"greatnpc.cooldown": "Você poderá batalhar novamente em %1$s."
}
Enable the pack on the client and select its language in Minecraft's language settings. Reload resources with F3+T after editing the JSON. Reopen existing GreatNPC screens after changing languages; some screens build their labels when opened.
Translation parameters¶
Keep positional placeholders such as %1$s, %2$s and %3$s in translated messages. You can reorder them to fit your language, but do not rename them or replace them with %player% or Java-style brace placeholders. The resource file is the reference for the expected argument count.
If a language value needs a literal percent sign in a formatted message, escape it as %%. Preserve intentional leading/trailing spaces in entries that are used as labels or fragments. Keep valid JSON and UTF-8 encoding; escape double quotes inside values as \".
Built-in language resources use native Minecraft translations. Do not assume that <gold>, click-event tags or every MiniMessage feature will be interpreted in a language-file value. Translate the text while retaining the message's placeholders.
Custom NPC content is separate¶
The NPC's own dialogue pages, button labels, custom action messages, names and command-reward labels are administrator-authored content. They are stored in NPC/preset data rather than automatically generated translation keys. Editing a resource pack does not automatically translate arbitrary story text saved in a preset.
Those custom fields can use GreatNPC's MiniMessage-style parser, for example:
Here %player% is an interaction placeholder. It is different from the positional %1$s argument syntax in a language resource. Use only formatting supported by GreatNPC's parser; full Adventure MiniMessage compatibility is not implied.
Old language configuration¶
lang.conf and the earlier messages.json are no longer the language override mechanism. Leaving an old file on disk does not apply it. Transfer your desired translations to the correct resource-pack language JSON using the current en_us.json keys.
Resource packs may also replace textures under assets/greatnpc/textures/. Texture replacements and translated language strings can be distributed together in the same pack.