smithery/cedrosdev

native-translations

Guide for native WinnetouJs translations (i18n).

Installation

$ npx skills add smithery/cedrosdev --skill native-translations

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/cedrosdev.

npx skills add smithery/cedrosdev

Browse all from smithery/cedrosdev

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,501 B
  • docs SUMMARY.md 75 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

RULES:

  • import: updateTranslations, changeLang
  • base language is JS/TS file (not JSON)
  • JSON files live in public/translations
  • call updateTranslations() before render (await)
  • use changeLang(code, reload) to switch

BASE STRINGS (JS/TS):

import { W } from "winnetoujs";

export default W.strings = {
  appTitle: "My App",
  home: "Home",
  buttonText: "Change Language",
};

INIT:

import { updateTranslations } from "winnetoujs/modules/translations";
import strings from "./translations/en-us";

await updateTranslations({
  stringsClass: strings,
  translationsPublicPath: "/translations",
});
startApp();

JSON (public/translations/pt-br.json):

{
  "appTitle": "Meu App",
  "home": "Início",
  "buttonText": "Mudar Idioma"
}

USE IN CONSTRUCTO:

new $header({ title: strings.appTitle }).create("#app");

CHANGE LANGUAGE:

import { changeLang } from "winnetoujs/modules/translations";

changeLang("pt-br", true); // reload

NO RELOAD (manual re-render):

await changeLang("pt-br", false);
renderApp();

BEST PRACTICES:

  • keep keys consistent across JSON files
  • group strings by feature for large apps
  • avoid hardcoded UI strings

TROUBLESHOOT:

  • not loading: check translationsPublicPath and JSON location
  • not updating: use reload or re-render
  • base not working: export W.strings and await updateTranslations()