i18n

Replace hardcoded Chinese strings with i18n.t keys in JavaScript projects.

4|Updated Dec 5, 2025
One-click install
npx skills add https://github.com/aaaa47080/stock_agent --skill i18n-aaaa47080
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: i18n
Source: https://github.com/aaaa47080/stock_agent/tree/main/.opencode/skills/i18n
Command: npx skills add https://github.com/aaaa47080/stock_agent --skill i18n-aaaa47080

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers replace hardcoded Chinese strings in JavaScript projects with translation keys and locale files, enabling scalable localization workflows.

Core Features & Use Cases

  • Centralized translations: Manage translations in en.json and zh-TW.json to support multilingual UI.
  • Automated key usage: Replace text with i18n.t keys across components and templates.
  • Use Case: When shipping a new Chinese UI, update translation files and verify runtime key resolution without duplicating strings.

Quick Start

Run the i18n workflow to replace hardcoded Chinese strings with translation keys and update en.json and zh-TW.json.

Frequently Asked Questions about i18n

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

FAQPage Schema
How do I replace hardcoded Chinese strings in JavaScript with translation keys?

Replacing hardcoded Chinese strings involves identifying text across UI components and templates, then substituting them with i18n.t keys. This workflow updates en.json and zh-TW.json locale files to ensure proper runtime key resolution.

What is the best way to manage frontend localization for English and Traditional Chinese UI?

The best way to manage frontend localization for English and Traditional Chinese UI is by centralizing translations in en.json and zh-TW.json files. This replaces inline text with i18n library keys, preventing string duplication across modules.

Does this i18n workflow support updating both en.json and zh-TW.json translation files automatically?

Yes, this i18n workflow automatically updates both en.json and zh-TW.json translation files. It enforces translation key creation and ensures both English and Chinese JSON files receive the necessary updates during string replacement.

How do I handle internationalization for dynamic text rendering in web components?

Handling internationalization for dynamic text rendering in web components requires integrating the i18n library to resolve keys at runtime. This workflow maps hardcoded Chinese strings to translation keys, covering dynamic text rendering across JavaScript modules.

When do I need to create translation keys for HTML attributes in a JavaScript app?

You need to create translation keys for HTML attributes in a JavaScript app when shipping a multilingual UI. This workflow applies internationalization to HTML attributes, replacing hardcoded Chinese text with i18n keys for scalable localization.

Can I verify runtime key resolution without duplicating strings across modules?

Yes, you can verify runtime key resolution without duplicating strings by integrating with the i18n library. This workflow replaces hardcoded Chinese strings with centralized translation keys, ensuring keys resolve correctly at runtime across modules.