Agent skill

Localization

by jame581 in jame581/GodotPrompter

A skill your agent uses when implementing localization (i18n/l10n) — TranslationServer, CSV/PO translation files, locale switching, RTL support, and pluralization in Godot 4.3+

MITAuto-check passedFrontend & Design

Install Localization

skills CLI
$ npx skills add jame581/GodotPrompter --skill localization -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jame581/GodotPrompter localization --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jame581/GodotPrompter.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/localization .claude/skills/localization && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
localization
GitHub stars
792
Token cost
~3.2k tokens
SKILL.md length
940 words
Files
5 (incl. references)
Skills in repo
58
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when implementing localization (i18n/l10n) — TranslationServer, CSV/PO translation files, locale switching, RTL support, and pluralization in Godot 4.3+

  • Works in 11 steps: Core Concepts → Translation Files → Using tr() in Code → …
  • Implementing localization (i18n/l10n) — TranslationServer
  • SKILL.md covers 1. Core Concepts, 2. Translation Files, 3. Using tr() in Code and 4. Switching Locale at Runtime, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Localization is an agent skill from jame581/GodotPrompter. Use when implementing localization (i18n/l10n) — TranslationServer, CSV/PO translation files, locale switching, RTL support, and pluralization in Godot 4.3+

Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/csv-plural-context.md`, `references/editor-preview.md` and `references/locale-formatting.md`).

It sits in Frontend & Design, covering Internationalization, Game development and Translation. It works with Godot and C#. The repository describes itself as: Agentic skills framework for Godot 4.x. Domain-specific skills for AI coding agents (Claude Code, Copilot, Antigravity, Cursor). The licence is MIT.

When your agent uses it

  • Implementing localization (i18n/l10n) — TranslationServer
  • CSV/PO translation files
  • Locale switching
  • Pluralization in Godot 4.3+

Example prompts

  • “/localization”

Workflow steps

11 steps, taken from the step headings in SKILL.md.

  1. Core Concepts
  2. Translation Files
  3. Using tr() in Code
  4. Switching Locale at Runtime
  5. Right-to-Left (RTL) Support
  6. Locale-Aware Formatting
  7. Project Organization
  8. Common Pitfalls
  9. Editor Locale Preview (Godot 4.5+)
  10. CSV Plural and Context Support (Godot 4.6+)
  11. Implementation Checklist

What it can do on your machine

Read from SKILL.md and the folder at commit 1e7d79d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are gdscript, csharp and csv).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • docs.godotengine.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Localization loads about 3.2k tokens when it runs, and up to ~5.2k if it reads all its reference files. Until then it costs about 42 tokens; SKILL.md has 940 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~42
When it runs · the whole SKILL.md, loaded when a task matches
~3.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jame581/GodotPrompter at commit 1e7d79d, republished under its MIT licence (© jame581). 940 words, ~3,209 tokens.

Download SKILL.mdSave it as .claude/skills/localization/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
localization
description
Use when implementing localization (i18n/l10n) — TranslationServer, CSV/PO translation files, locale switching, RTL support, and pluralization in Godot 4.3+

Localization in Godot 4.3+

All examples target Godot 4.3+ with no deprecated APIs; GDScript first, then C#.

Related skills: godot-ui for Control nodes and theme management, save-load for persisting language settings, responsive-ui for layout adjustments per locale.


1. Core Concepts

How Godot Localization Works
  1. Wrap all user-facing strings in tr() — Godot's translation function
  2. Create translation files (CSV or PO) mapping keys to translated strings
  3. Import translation files as Translation resources
  4. Switch locale at runtime via TranslationServer.set_locale()

All Control nodes with text, tooltip_text, or placeholder_text properties auto-translate when the value matches a translation key.

Translation Key Strategies
StrategyExample KeyProsCons
Semantic keysMENU_START_GAMEClear intent, easy to findNeeds a default language fallback
English-as-keyStart GameReadable code, no mapping file for EnglishBreaks if English text changes

Recommendation: Use semantic keys (MENU_START_GAME) for production; English-as-key only for prototypes or solo projects.


2. Translation Files

CSV Format

The simplest format. First column is the key, subsequent columns are locale codes.

csv
keys,en,cs,de,ja
MENU_START,Start Game,Začít hru,Spiel starten,ゲームスタート
MENU_OPTIONS,Options,Nastavení,Optionen,オプション
MENU_QUIT,Quit,Ukončit,Beenden,終了
PLAYER_HEALTH,Health: %d,Zdraví: %d,Gesundheit: %d,体力: %d
ITEM_COLLECTED,%s collected!,%s sebráno!,%s gesammelt!,%sを入手!

Save as translations.csv in your project. Godot auto-detects the format on import.

Import settings (Import dock):

  • Delimiter: Comma (default) or Tab
  • Translations section: enable/disable individual locales
PO Format (Gettext)

Industry-standard format, preferred by translation teams and tools like Poedit, Weblate, Crowdin.

Create a POT template (messages.pot):

msgid "MENU_START"
msgstr ""

msgid "MENU_OPTIONS"
msgstr ""

msgid "MENU_QUIT"
msgstr ""

msgid "PLAYER_HEALTH"
msgstr ""

Create locale files (e.g., cs.po for Czech):

msgid "MENU_START"
msgstr "Začít hru"

msgid "MENU_OPTIONS"
msgstr "Nastavení"

msgid "MENU_QUIT"
msgstr "Ukončit"

msgid "PLAYER_HEALTH"
msgstr "Zdraví: %d"
Registering Translations

Project Settings → Localization → Translations → Add... → select your .csv or .po files.

Or register at runtime:

gdscript
var translation := load("res://translations/cs.po") as Translation
TranslationServer.add_translation(translation)
csharp
var translation = GD.Load<Translation>("res://translations/cs.po");
TranslationServer.AddTranslation(translation);

⚠️ Changed in Godot 4.7: OptimizedTranslation.generate() now returns bool (was void). GDScript- and C#-source-compatible, but binary-incompatible — recompile precompiled C# plugins calling it. See the 4.7 migration guide.

POT Generation Hooks (Godot 4.7+)

A custom EditorTranslationParserPlugin can override _customize_strings() — called once after all files are parsed during POT generation — to add or remove entries from the final extracted-string list:

gdscript
@tool
extends EditorTranslationParserPlugin

func _customize_strings(strings: Array[PackedStringArray]) -> Array[PackedStringArray]:
    strings.append(PackedStringArray(["Test 1", "context", "test 1 plurals", "test 1 comment"]))
    # Drop internal strings that begin with "$".
    return strings.filter(func(s): return not s[0].begins_with("$"))
csharp
#if TOOLS
using System.Linq;
using Godot;

public partial class CommentAwareParser : EditorTranslationParserPlugin
{
    public override Godot.Collections.Array<string[]> _CustomizeStrings(Godot.Collections.Array<string[]> strings)
    {
        strings.Add(new[] { "Test 1", "context", "test 1 plurals", "test 1 comment" });
        // Drop internal strings that begin with "$".
        return new Godot.Collections.Array<string[]>(strings.Where(s => !s[0].StartsWith("$")));
    }
}
#endif

Godot 4.7+: The POT generator also extracts Control.accessibility_name and accessibility_description, making accessibility strings translatable without manual listing. (GH-117134)


3. Using tr() in Code

GDScript
gdscript
# Basic translation
var label_text: String = tr("MENU_START")  # "Start Game" or translated equivalent

# With format arguments
var health_text: String = tr("PLAYER_HEALTH") % current_health
# "Health: 85" or "Zdraví: 85"

# With string arguments
var collected_text: String = tr("ITEM_COLLECTED") % item_name
# "Sword collected!" or "Meč sebráno!"

# Pluralization (Godot 4.x)
var count := 5
var msg: String = tr_n("ONE_ENEMY", "MANY_ENEMIES", count)
# Requires PO files with plural forms
C#
csharp
string labelText = Tr("MENU_START");
string healthText = string.Format(Tr("PLAYER_HEALTH"), currentHealth);

// Pluralization
string msg = TrN("ONE_ENEMY", "MANY_ENEMIES", count);
Automatic Control Translation

Label, Button, RichTextLabel, and other Control nodes auto-translate their text property when it matches a translation key. Set the text to the key:

Button.text = "MENU_START"   → displays "Start Game" (en) or "Začít hru" (cs)

Tip: To disable automatic translation on a specific Control, set auto_translate_mode to DISABLED.

Godot 4.7+: Control.translation_context: StringName sets a per-control translation context, used both to translate displayed text and to generate translation templates — the property equivalent of tr()'s context argument (C#: TranslationContext). (GH-115340)


4. Switching Locale at Runtime

GDScript
gdscript
# Switch language
func set_language(locale_code: String) -> void:
    TranslationServer.set_locale(locale_code)
    # All Control nodes with translation keys update automatically

# Get current locale
var current: String = TranslationServer.get_locale()  # e.g. "en", "cs", "de"

# Get available locales
var locales: PackedStringArray = TranslationServer.get_loaded_locales()
C#
csharp
public void SetLanguage(string localeCode)
{
    TranslationServer.SetLocale(localeCode);
}

string current = TranslationServer.GetLocale();
Language Selection Menu
gdscript
extends Control

@onready var language_button: OptionButton = %LanguageButton

var _locales: Array[Dictionary] = [
    {"code": "en", "name": "English"},
    {"code": "cs", "name": "Čeština"},
    {"code": "de", "name": "Deutsch"},
    {"code": "ja", "name": "日本語"},
]

func _ready() -> void:
    for locale in _locales:
        language_button.add_item(locale["name"])

    # Set current selection
    var current_locale: String = TranslationServer.get_locale()
    for i in _locales.size():
        if _locales[i]["code"] == current_locale:
            language_button.selected = i
            break

    language_button.item_selected.connect(_on_language_selected)

func _on_language_selected(index: int) -> void:
    TranslationServer.set_locale(_locales[index]["code"])
    # Save preference — SettingsManager is a user-created autoload (see save-load skill)
    SettingsManager.set_setting("general", "locale", _locales[index]["code"])

5. Right-to-Left (RTL) Support

Arabic, Hebrew, and Persian need layout_direction on Controls (LOCALE auto-follows the current locale), structured_text_type so URLs and paths do not fully reverse, and a font covering the script — Godot's default font does not. Re-apply layout direction whenever the locale changes. TranslationServer has no signals — override _notification and watch for NOTIFICATION_TRANSLATION_CHANGED (defined on MainLoop, inherited by Node). Since you never subscribe, there is no handler to disconnect.

Full recipes, per-control property table, BBCode for mixed direction, and the C# LocaleAwarePanel: references/rtl-support.md


6. Locale-Aware Formatting

GDScript has no locale-aware number or date formatting — "%d" % 1234567 is always 1234567, so you group digits by hand. C# does have it: look up a CultureInfo from TranslationServer.GetLocale() (swap _ for -) and use ToString("N"/"C"/"d", culture).

Both helpers in full: references/locale-formatting.md


7. Project Organization

res://
├── translations/
│   ├── game.csv           # Main game translations
│   ├── ui.csv             # UI-specific translations
│   └── items.csv          # Item names and descriptions
├── fonts/
│   ├── default_font.ttf   # Latin, Cyrillic
│   └── cjk_font.ttf       # Chinese, Japanese, Korean
└── themes/
    └── default_theme.tres  # Font assignments per locale
Translation Keys Convention
# Category_Context_Description
MENU_MAIN_START          # Main menu, start button
MENU_MAIN_QUIT           # Main menu, quit button
HUD_HEALTH_LABEL         # In-game HUD, health label
DIALOGUE_NPC_GREETING    # NPC dialogue, greeting line
ITEM_SWORD_NAME          # Inventory item name
ITEM_SWORD_DESC          # Inventory item description

Show full SKILL.md (408 more words)Show less

8. Common Pitfalls

SymptomCauseFix
Translation key shows instead of textTranslation file not registered in Project SettingsAdd to Project Settings → Localization → Translations
Text doesn't update on locale switchUsing string literals instead of tr()Wrap all user-facing strings in tr()
Label shows key after scene changeTranslation resource not loaded yetRegister translations in Project Settings (not at runtime)
RTL text renders LTRlayout_direction not setSet to RTL or LOCALE on root Control
Font doesn't display charactersMissing Unicode range in fontImport a font covering the target script (Noto Sans recommended)
Pluralization doesn't work with CSVCSV doesn't support plural formsUse PO format for languages with complex plural rules
%s in translation shows literal %sUsing tr() result as key instead of formatting itUse tr("KEY") % value, not tr("KEY" % value)

9. Editor Locale Preview (Godot 4.5+)

Godot 4.5 adds a Preview Language dropdown under Project Settings → Internationalization: the editor viewport re-renders in any registered locale, so you catch overflow from longer translations and verify RTL layout without entering Play mode. Editor-only — it does not affect exported builds.

Steps and QA benefits: references/editor-preview.md


10. CSV Plural and Context Support (Godot 4.6+)

Godot 4.6 extends CSV translation with three optional header columns — ?context, ?plural, ?pluralrule — bringing context disambiguation and simple one/other plurals (previously PO-only) to CSV. Languages with 3+ plural forms (Russian, Polish, Arabic) still need PO format with full msgstr[n] plural arrays.

Column reference, example CSV, and tr() / tr_n() usage (GDScript + C#): references/csv-plural-context.md.


11. Implementation Checklist

  • All user-facing strings use tr() (or are set as translation keys on Control nodes)
  • Translation files (CSV or PO) are registered in Project Settings → Localization → Translations
  • Language can be switched at runtime via TranslationServer.set_locale()
  • Language preference is saved and restored on game launch
  • Fonts cover all target language character sets (Latin, CJK, Arabic, etc.)
  • RTL languages have layout_direction set to RTL or LOCALE on root UI containers
  • Format strings (%s, %d) are applied AFTER tr(), not before
  • Translation keys follow a consistent naming convention
  • UI layout adapts to longer/shorter text in different languages (no hardcoded widths)
  • PO format is used for languages with complex plural rules
  • Editor Locale Preview (Internationalization → Preview Language) used for translation QA instead of test runs (Godot 4.5+)
  • CSV ?context column used when the same key has different meanings in different UI contexts (Godot 4.6+)
  • CSV ?plural / ?pluralrule columns used for simple one/other plurals; PO format used for 3+ plural forms (Godot 4.6+)

© jame581, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in skills/localization of jame581/GodotPrompter.

  • SKILL.md
  • references/csv-plural-context.md
  • references/editor-preview.md
  • references/locale-formatting.md
  • references/rtl-support.md

Open the folder on GitHubat commit 1e7d79d

Compare with similar skills

Localization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Localization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Localization this skilljame581/GodotPrompter792—~3.2kAutomated safety check: PassMIT
Translation Source SyncDevolutions/UniGetUI26k—~1.2kAutomated safety check: PassMIT
Godot Admob App Openpoingstudios/godot-admob-plugin631—~1kAutomated safety check: PassMIT
Godot Admob Bannerpoingstudios/godot-admob-plugin631—~718Automated safety check: PassMIT
Godot Admob Get Startedpoingstudios/godot-admob-plugin631—~1kAutomated safety check: PassMIT
Godot Admob Interstitialpoingstudios/godot-admob-plugin631—~1.1kAutomated safety check: PassMIT

Similar skills

  • Translation Source Sync

    Devolutions/UniGetUI

    Synchronizes the UniGetUI English language file with source-code usage, identifies missing translation keys, removes unused entries, reports localization drift, and can reorder locale files to match…

    26k GitHub stars~1.2k tokensUpdated today
    Writing & ContentAuto-check passed
  • Godot Admob App Open

    poingstudios/godot-admob-plugin

    Provides instructions to implement, load, show, and destroy App Open ads (shown on application startup or app resume) in GDScript and C.

    631 GitHub stars~1k tokensUpdated 6 days ago
    Game DevelopmentAuto-check passed
  • Godot Admob Banner

    poingstudios/godot-admob-plugin

    Provides instructions to implement, load, and destroy banner ads (AdView) using custom or adaptive sizes in GDScript and C.

    631 GitHub stars~718 tokensUpdated 6 days ago
    Game DevelopmentAuto-check passed
  • Godot Admob Get Started

    poingstudios/godot-admob-plugin

    Provides instructions to initialize the Godot AdMob SDK and configure user consent (UMP Flow) in GDScript and C.

    631 GitHub stars~1k tokensUpdated 6 days ago
    Game DevelopmentAuto-check passed
  • Godot Admob Interstitial

    poingstudios/godot-admob-plugin

    Provides instructions to implement, load, show, and destroy interstitial ads (full-screen image/text ads) in GDScript and C.

    631 GitHub stars~1.1k tokensUpdated 6 days ago
    Game DevelopmentAuto-check passed
  • Godot Admob Native Overlay

    poingstudios/godot-admob-plugin

    Provides instructions to implement, load, show, and destroy Native Overlay ads (customized/native-looking Control node template overlays) in GDScript and C.

    631 GitHub stars~1k tokensUpdated 6 days ago
    Game DevelopmentAuto-check passed

More from jame581/GodotPrompter

All 58 skills in this repo
  • Godot 2D Essentials

    jame581/GodotPrompter

    Covers Godot 4.3+ 2D systems with GDScript and C# examples: canvas layers, draw order, TileMaps, parallax, lights and shadows, particles and custom drawing.

    792 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Godot 3D Essentials

    jame581/GodotPrompter

    Covers Godot 4.3+ 3D systems such as materials, lighting, shadows, environment, global illumination, fog, LOD, occlusion culling and decals, with GDScript first and C# second.

    792 GitHub stars~3.7k tokensUpdated yesterday
    Auto-check passed
  • Godot Ability System

    jame581/GodotPrompter

    Builds a data-driven ability system in Godot 4 from Resources and a component node, with cooldowns, buffs, stat modifiers, gameplay tags and HUD binding.

    792 GitHub stars~3k tokensUpdated yesterday
    Auto-check passed
  • Godot Addon Development

    jame581/GodotPrompter

    Covers Godot 4.3+ editor plugins: plugin folders, @tool scripts, the EditorPlugin lifecycle, custom inspectors, dock panels and gizmos, in GDScript and C#.

    792 GitHub stars~3.3k tokensUpdated yesterday
    Auto-check passed
  • Godot AI Navigation

    jame581/GodotPrompter

    Covers pathfinding and enemy movement in Godot 4.3 and later: navigation regions, NavigationAgent nodes, steering, behavior trees and patrol routes.

    792 GitHub stars~3.5k tokensUpdated yesterday
    Auto-check passed
  • Godot Animation System

    jame581/GodotPrompter

    Covers animation in Godot 4.3 and later: AnimationPlayer basics, AnimationTree blend trees and state machines, sprite animation, skeleton IK and code-driven motion.

    792 GitHub stars~3.8k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Localization

What does Localization do?

A skill your agent uses when implementing localization (i18n/l10n) — TranslationServer, CSV/PO translation files, locale switching, RTL support, and pluralization in Godot 4.3+. Localization is an agent skill from jame581/GodotPrompter.

When should I use Localization?

Localization fits situations like: implementing localization (i18n/l10n) — TranslationServer; CSV/PO translation files; locale switching; pluralization in Godot 4.3+.

How do I install Localization in Claude Code?

Run `npx skills add jame581/GodotPrompter --skill localization -a claude-code`. Or copy the skill folder (skills/localization in jame581/GodotPrompter) into .claude/skills/localization in your project. Claude Code loads it when a task matches its description.

How do I install Localization in Codex?

Run `npx skills add jame581/GodotPrompter --skill localization -a codex`. Or copy the skill folder (skills/localization in jame581/GodotPrompter) into .agents/skills/localization in your project. Codex loads it when a task matches its description.

Can I use Localization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jame581/GodotPrompter --skill localization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/localization, .gemini/skills/localization, .github/skills/localization and .opencode/skills/localization in your project.

What does Localization need to run?

SKILL.md names no scripts, command-line tools or credentials: Localization is instructions for the agent only.

Does Localization access the network?

SKILL.md names 2 domains. As links in the text: github.com and docs.godotengine.org. This is read from the text; nothing was executed.

Is Localization safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Localization use?

Localization is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Localization use?

About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2k tokens, read only when the agent opens those files.

What are the alternatives to Localization?

Skills that share tags, products or a category with Localization: Translation Source Sync (Devolutions/UniGetUI, 26k stars), Godot Admob App Open (poingstudios/godot-admob-plugin, 631 stars), Godot Admob Banner (poingstudios/godot-admob-plugin, 631 stars) and Godot Admob Get Started (poingstudios/godot-admob-plugin, 631 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Localization?

jame581 (a GitHub user) maintains it in jame581/GodotPrompter, which has 792 GitHub stars. The repository holds 58 skills in this directory. The repository was last updated on October 6, 2026.

Source: jame581/GodotPrompter on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.