Bilingual EN/ES Retrofit Kit

    1

    This kit takes the retrofit route and makes it safe.

    $39

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Bilingual EN/ES Retrofit Kit

    Example session with this skill installed

    Our Express + vanilla JS customer portal needs Spanish by the end of the month. We can't rewrite the templates. Set it up and tell me what's still untranslated.

    • Read your context and instructions
    • Compiled the bilingual en es

    Summary

    Spanish is live behind the language switch with 312 of 348 user-visible strings covered by the dictionary and 9 pattern rules. The coverage gate is in CI and currently lists 36 strings for translation, 11 of which are legal, billing or safety copy that need your reviewer. Emails and SMS follow the saved preference. Public pages have /es/ twins with reciprocal hreflang.

    What changed

    AreaChange
    Enginepublic/assets/i18n-engine.js loaded before app.js; data-no-i18n on the rich-text editor and on <pre> blocks; data-i18n-toggle on the footer language link
    Dictionarypublic/locales/es.json: 312 entries + 9 @patterns (counts, "Page N of M", "Saved <time>", "Could not save: <reason>", invoice totals); @ignore: Acme, PDF, CSV, IBAN
    Serverusers.preferred_language column (migration 0042); resolution middleware (path, query, user, cookie, Accept-Language); t() on 27 API error messages; /api/me/language endpoint
    Email6 transactional templates duplicated under emails/es/; subject lines and footer included
    SMSSpanish bodies for the 3 notifications; STOP/HELP kept literal with "Responda STOP para cancelar" appended
    SEO14 public pages twinned under /es/, own titles and descriptions, canonical, hreflang en/es/x-default, both in sitemap.xml; noindex on /app/
    CIcheck-locales.mjs and i18n-coverage.mjs added to the test job

    Coverage gate output

    $ node scripts/i18n-coverage.mjs --dict public/locales/es.json --src public --src views --src src/api
    i18n coverage: scanned 61 file(s), 348 string occurrence(s), dictionary (312 entries, 9 patterns)
    FAIL: 36 user-visible string(s) have no dictionary entry and match no pattern.
      views/billing/invoice.ejs:44     "Your card will be charged on the due date."        [billing: human review]
      views/legal/terms.ejs:12-88      31 strings                                           [legal: human review]
      public/js/alerts.js:9            "If you are in danger, call 911."                    [safety: human review]
      views/account/profile.ejs:27     "Two-factor authentication is on"
      views/account/profile.ejs:31     "Recovery codes"
      public/js/upload.js:52           "{count} files ready"   -> suggested pattern: ^(\d+) files? ready$
    

    Still open

    1. 11 legal/billing/safety strings: sent to your reviewer with the dictionary keys; do not machine-translate these.
    2. 25 remaining UI strings: translations proposed in locales/es.pending.json; merge after a skim.
    3. Android app: out of scope this month (reference/adding-a-language.md section 9).

    check-locales.mjs passes: no placeholder mismatches, no untranslated values, all 9 patterns compile.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    The standard route to a second language is wrapping every string in t() and extracting keys, which on an existing app means touching every template and shipping nothing for weeks. This kit takes the retrofit route and makes it safe.

    How it works: English rendered text is the dictionary key. A 200-line runtime engine (scripts/i18n-engine.js, one script tag) translates text nodes and the alt, aria-label, placeholder and title attributes, watches the DOM for anything rendered later, and applies ordered @patterns rules for counts, plurals and appended details. Anything not in the dictionary stays in English on purpose, which is how user data, names and codes are protected.

    What keeps it honest:

    • scripts/i18n-coverage.mjs: scans HTML, JS, templates and optionally server files for user-visible strings and fails CI on any that has no entry, no pattern and is not pure data. It also fails if it finds suspiciously few strings, so a broken scan cannot pass as clean.
    • scripts/check-locales.mjs: validates locale files (placeholder parity, patterns compile, no shadowed keys, no untranslated values, key parity across languages).
    • A sample dictionary with 30 generic UI strings and 7 pattern rules.

    References: server-side resolution order and a preferred_language column, Express middleware, server t() for API error messages, per-language email templates, SMS rules (STOP/HELP literal), a React provider for apps that are not server-rendered, the twelve-surface add-a-language checklist (manifest through store listings), and a bilingual SEO checklist with reciprocal hreflang, x-default, sitemap twins and the tests to keep green.

    Node 20+, no packages, no network. Spanish is the worked example; the mechanism is language-agnostic.

    Requires Node 20+. Does not support RTL layouts. Identical English strings require pattern rules for different contextual translations. DOM observation adds slight overhead to heavy updates.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 19 days ago

    Requires

    Node.js 20 or later

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed19 days ago

    What's inside

    Frequently Asked Questions

    Unlike traditional i18n libraries that require manual string wrapping (e.g., t('hello')), this skill uses a MutationObserver to detect and translate text as it renders in the browser, meaning you don't have to rewrite your application's architecture.

    The runtime engine is framework-agnostic vanilla JavaScript, making it compatible with React, Vue, Angular, or even static HTML, provided you are using Node 20+ for the analysis and CI scripts.

    The package includes the lightweight runtime translation engine, the automated coverage scanning scripts for your CI/CD pipeline, a twelve-surface audit checklist, and templates for pattern-matching dynamic strings.

    The included coverage scripts scan your source code to identify any strings missing from your dictionary and can be configured to fail builds in your CI/CD pipeline if untranslated content is detected.

    Because it uses English text as the unique key, two identical English words that require different Spanish translations based on context must be handled using the provided regex pattern-matching rules.

    No, the engine is designed to only translate the rendered DOM (UI labels, placeholders, and ARIA tags); it does not touch or translate user-generated data or input values to ensure data integrity.

    New in Translation & Localization