Add localization

From nisrulz/app-privacy-policy-generator · View interactive version

Add localization is an AI agent skill from the GitHub repository nisrulz/app-privacy-policy-generator. Add or update a language translation in the privacy policy generator. Trigger when user says: "add {language} translation", "add locale", "translate to {language}", "add localization for {language}", or when a user wants to contribute a new language.

How to use this skill

Skill file

Add Localization

Quick Steps

1. Create locale JSON from English

cp src/locales/en.json src/locales/{code}.json

Use the ISO 639-1 language code (e.g., es, fr, de, ja, pt, zh).

2. Translate all string values

Edit the new JSON file. Only translate values, never keys.

✅ Correct:

"wizard.step1.tagline": "Genera un documento personalizado..."

❌ Wrong — don't change keys:

"wizard.step1.tagline_es": "Genera un documento personalizado..."

3. Preserve `{{ variable }}` placeholders

Keep placeholders like {{ appName }}, {{ platformDesc }}, {{ deviceType }} unchanged in the translated text.

4. Build

make build

The Go build tool detects every JSON file in src/locales/ and generates the HTML and JavaScript for each locale.

Open public/index.html — the language switcher dropdown now includes the new language.

Validation Checklist

Important Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.