add-localization

Add a locale JSON file and register it for UI selection.

4.7k|464|Updated Feb 21, 2017
One-click install
npx skills add https://github.com/nisrulz/app-privacy-policy-generator --skill add-localization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-localization
Source: https://github.com/nisrulz/app-privacy-policy-generator/tree/main/.agents/skills/add-localization
Command: npx skills add https://github.com/nisrulz/app-privacy-policy-generator --skill add-localization

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The skill solves the problem of expanding the privacy policy generator so it can display legal templates, UI text, and FAQs in additional languages for users.

Core Features & Use Cases

  • Locale JSON creation from English: Copy the English locale file and translate only the string values to ensure consistency in structure.
  • Safe placeholder preservation: Keep dynamic placeholders like {{ appName }}, {{ platformDesc }}, and {{ deviceType }} unchanged so generated policies remain accurate.
  • Register and render the new locale: Add the language to the locale dropdown and update the render pipeline so the app loads the new translations at runtime.

Quick Start

Ask the skill to add localization for Spanish and provide the language code (for example, es), then edit the generated locale file by translating all values while leaving all keys and {{ placeholders }} untouched.

Frequently Asked Questions about add-localization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new language translation to a privacy policy generator?

To add a language translation, you create a locale JSON file from the English source, translate the string values, and register it in the availableLocales configuration. You must also update the render.sh build loop to ensure the app loads the new translations at runtime.

How do I preserve dynamic placeholders when translating a locale JSON file?

When translating a locale JSON file, you must keep dynamic placeholders like {{ appName }}, {{ platformDesc }}, and {{ deviceType }} completely unchanged. Leaving these variable placeholders untouched ensures the generated privacy policy remains accurate and properly populated.

What is the correct format for language codes when adding i18n locale support?

Adding i18n locale support requires using standard ISO 639-1 language codes. For example, you would use 'es' for Spanish. Providing the correct two-letter code ensures the locale is properly registered for UI selection in the language dropdown.

How do I make a newly translated locale appear in the language dropdown?

To make a translated locale visible in the language dropdown, you must update the availableLocales list and the render.sh locale build loop. After registering the new language, run a successful npm run build to validate that the locale appears correctly in the UI.

Can I use this approach to localize legal templates and FAQ text across different app types?

Yes, this localization process applies to adding locales for legal templates, FAQ text, disclaimer text, and platform vocabulary across all supported app types. Creating and translating the locale JSON file ensures all UI and legal text is fully localized for the user.

Why is my newly added privacy policy translation not showing up after build?

If a privacy policy translation is not showing up, the locale JSON file may not be properly registered in the availableLocales list or the render.sh build loop. You must ensure a successful npm run build completes to validate visibility in the language dropdown.