/fvtt-dev:fvtt-localizationfrom fvtt-dev
This skill should be used when implementing internationalization (i18n), creating language files, using game.i18n.localize/format, adding template localization helpers, or following best practices for translatable strings.
Ships in fvtt-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Domain: Foundry VTT Module/System Development Status: Production-Ready Last Updated: 2026-01-05
Foundry VTT uses JSON language files for internationalization. All user-facing text should be localized to support translation.
{
"MYMODULE.Title": "My Module",
"MYMODULE.Settings.Enable": "Enable Feature",
"MYMODULE.Settings.EnableHint": "Turn this feature on or off",
"MYMODULE.Dialog.Confirm": "Are you sure?",
"MYMODULE.Button.Save": "Save",
"MYMODULE.Button.Cancel": "Cancel"
}
Use your package ID as prefix to avoid conflicts:
{
"MYSYSTEM.Actor.HP": "Hit Points",
"MYSYSTEM.Actor.AC": "Armor Class",
"MYSYSTEM.Item.Weight": "Weight"
}
{
"TYPES": {
"Actor": {
"character": "Character",
"npc": "Non-Player Character",
"vehicle": "Vehicle"
},
"Item": {
"weapon": "Weapon",
"armor": "Armor",
"spell": "Spell"
}
}
}
{
"id": "my-module",
"languages": [
{
"lang": "en",
"name": "English",
"path": "lang/en.json"
},
{
"lang": "es",
"name": "Español",
"path": "lang/es.json"
},
{
"lang": "fr",
"name": "Français",
"path": "lang/fr.json"
}
]
}
Use ISO 639-1 (2-letter) or ISO 639-2 (3-letter) codes:
en - Englishes - Spanishfr - Frenchde - Germanja - Japanesezh - ChineseSimple string lookup:
const title = game.i18n.localize("MYMODULE.Title");
// Returns: "My Module"
// Missing key returns the key itself
const missing = game.i18n.localize("MYMODULE.Missing");
// Returns: "MYMODULE.Missing"
String interpolation with variables:
{
"MYMODULE.Welcome": "Welcome, {name}!",
"MYMODULE.ItemCount": "You have {count} items",
"MYMODULE.Comparison": "{item1} vs {item2}"
}
game.i18n.format("MYMODULE.Welcome", { name: "Alice" });
// Returns: "Welcome, Alice!"
game.i18n.format("MYMODULE.ItemCount", { count: 5 });
// Returns: "You have 5 items"
game.i18n.format("MYMODULE.Comparison", {
item1: "Sword",
item2: "Axe"
});
// Returns: "Sword vs Axe"
Check if translation exists:
// Check with English fallback
if (game.i18n.has("MYMODULE.Feature")) {
// Key exists (in current language OR English)
}
// Check without fallback
if (game.i18n.has("MYMODULE.Feature", false)) {
// Key exists in current language only
}
Format lists according to locale:
const formatter = game.i18n.getListFormatter({
style: "long", // "long", "short", "narrow"
type: "conjunction" // "conjunction", "disjunction"
});
formatter.format(["apples", "oranges", "bananas"]);
// English: "apples, oranges, and bananas"
// Spanish: "manzanas, naranjas y plátanos"
<h1>{{localize "MYMODULE.Title"}}</h1>
<button>{{localize "MYMODULE.Button.Save"}}</button>
<!-- In attributes, use single quotes -->
<input placeholder="{{localize 'MYMODULE.Placeholder'}}">
<a title="{{localize 'MYMODULE.Tooltip'}}">Hover me</a>
{{localize "MYMODULE.Welcome" name=user.name}}
{{localize "MYMODULE.ItemCount" count=items.length}}
{{localize (concat "MYMODULE.Status." statusKey)}}
Foundry has no built-in pluralization. Handle manually:
{
"MYMODULE.Item.One": "1 item",
"MYMODULE.Item.Many": "{count} items"
}
function localizeCount(count) {
const key = count === 1
? "MYMODULE.Item.One"
: "MYMODULE.Item.Many";
return game.i18n.format(key, { count });
}
// For complex languages, use multiple keys
const key = count === 0 ? "Zero"
: count === 1 ? "One"
: count < 5 ? "Few"
: "Many";
return game.i18n.format(`MYMODULE.Items.${key}`, { count });
{
// Good - specific and hierarchical
"MYSYS.CharacterSheet.Abilities.Strength": "Strength",
"MYSYS.CharacterSheet.Abilities.Dexterity": "Dexterity",
"MYSYS.Dialog.ConfirmDelete.Title": "Confirm Deletion",
"MYSYS.Dialog.ConfirmDelete.Message": "Delete {name}?",
// Bad - vague and conflict-prone
"MYSYS.Label": "Label",
"MYSYS.Title": "Title",
"MYSYS.Button": "Button"
}
{
// Good - translator can reorder
"MYMODULE.Message": "The {adjective} {noun} is here",
// Bad - forces English word order
"MYMODULE.Prefix": "The",
"MYMODULE.Suffix": "is here"
}
{
// Good - separate by context
"MYSYS.Button.Save.Settings": "Save Settings",
"MYSYS.Ability.Save.Fortitude": "Fortitude Save",
// Bad - ambiguous
"MYSYS.Save": "Save"
}
Do localize:
Don't localize:
game.settings.register("my-module", "enableFeature", {
name: game.i18n.localize("MYMODULE.Settings.Enable"),
hint: game.i18n.localize("MYMODULE.Settings.EnableHint"),
scope: "world",
type: Boolean,
default: true
});
new Dialog({
title: game.i18n.localize("MYMODULE.Dialog.Title"),
content: game.i18n.format("MYMODULE.Dialog.Content", {
name: item.name
}),
buttons: {
confirm: {
label: game.i18n.localize("MYMODULE.Button.Confirm"),
callback: () => { /* ... */ }
},
cancel: {
label: game.i18n.localize("MYMODULE.Button.Cancel")
}
}
}).render(true);
ui.notifications.info(
game.i18n.format("MYMODULE.Notification.Created", {
type: item.type,
name: item.name
})
);
// WRONG - breaks translation
const msg = game.i18n.localize("MYMOD.The") + " " +
name + " " +
game.i18n.localize("MYMOD.IsReady");
// CORRECT - use format with placeholders
const msg = game.i18n.format("MYMOD.ItemReady", { name });
// WRONG
ui.notifications.info("Character saved!");
// CORRECT
ui.notifications.info(game.i18n.localize("MYMOD.CharacterSaved"));
// Be defensive with dynamic keys
const key = `MYMOD.Status.${status}`;
const label = game.i18n.has(key)
? game.i18n.localize(key)
: status; // Fallback to raw value
<!-- WRONG - breaks attribute -->
<input title="{{localize "MYMOD.Tip"}}">
<!-- CORRECT - use single quotes inside -->
<input title="{{localize 'MYMOD.Tip'}}">
// Don't forget to register in manifest!
{
"languages": [
{ "lang": "en", "name": "English", "path": "lang/en.json" }
]
}
my-module/
├── module.json
├── lang/
│ ├── en.json # Required - fallback language
│ ├── es.json
│ ├── fr.json
│ └── de.json
├── templates/
│ └── sheet.hbs
└── scripts/
└── main.js
lang/en.json with all stringslocalize() for simple stringsformat() for strings with variablesLast Updated: 2026-01-05 Status: Production-Ready Maintainer: ImproperSubset
What SKILL.md sets; muted values are Claude Code's defaults
17 skills in this plugin
/fvtt-active-effectsThis skill should be used when creating or applying Active Effects, working with effect changes and modes (ADD, MULTIPLY, OVERRIDE, CUSTOM), implementing duration tracking for combat, or handling effect transfer from items to actors./fvtt-applicationsThis skill should be used when creating custom windows with ApplicationV2, building forms with FormApplication, using Dialog for prompts, understanding the render lifecycle, or migrating from Application v1 to ApplicationV2./fvtt-canvasThis skill should be used when working with the Foundry canvas, PIXI.js rendering, canvas layers, placeable objects (tokens, tiles, drawings), render flags for performance, or canvas lifecycle hooks like canvasReady./fvtt-chat-messagesThis skill should be used when creating chat messages, sending roll results to chat, configuring speakers, implementing whispers and roll modes, or hooking into chat message rendering./fvtt-combatThis skill should be used when working with the Combat tracker, Combatant documents, initiative rolling and sorting, turn/round management, or implementing combat hooks like combatStart, combatTurn, and combatRound./fvtt-compendiumsThis skill should be used when creating compendium packs, registering packs in manifests, importing/exporting documents, querying pack contents, or using the CLI for pack management and version control workflows.Other plugins' skills for the same job
npx claudepluginhub impropersubset/hh-agentics --plugin fvtt-dev