stacks-i18n

Manage translations, locale detection, and language resources for Stacks applications.

622|17|Updated Apr 26, 2022
One-click install
npx skills add https://github.com/stacksjs/stacks --skill stacks-i18n
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stacks-i18n
Source: https://github.com/stacksjs/stacks/tree/main/.claude/skills/stacks-i18n
Command: npx skills add https://github.com/stacksjs/stacks --skill stacks-i18n

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Internationalization support for Stacks applications, enabling translations, locale management, and multi-language files.

Core Features & Use Cases

  • Translation management and interpolation
  • Locale detection and per-user locale switching
  • Language file organization in locales/ and defaults in storage/framework/defaults/lang/
  • Use Case: Build multilingual UIs and APIs with per-locale responses

Quick Start

Run buddy make:lang to scaffold a new language file and start configuring locales in locales/.

Frequently Asked Questions about stacks-i18n

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

FAQPage Schema
How do I add internationalization to a Stacks app?

Internationalization in a Stacks app is provided by the stacks-i18n package, which manages translations, locale detection, and language resources. You configure locales in config/app.ts and scaffold language files using the buddy make:lang command.

What is the best way to manage per-user locale switching in TypeScript?

Per-user locale switching is handled by configuring locales in config/app.ts and organizing language resources. This enables multilingual UIs and APIs to return per-locale responses for individual users based on their detected or selected language.

Does Stacks i18n support translation interpolation and pluralization?

Stacks i18n supports translation interpolation and pluralization within multi-language projects. These features allow dynamic value insertion and correct noun forms across frontend and API contexts when managing multilingual translations.

How do I scaffold a new language file for multilingual translations?

Scaffold a new language file for multilingual translations by running the buddy make:lang command. This generates the necessary file structure in the locales/ directory, with default language resources stored in storage/framework/defaults/lang/.

Can I use Stacks i18n for both frontend UI and API responses?

Stacks i18n applies to both frontend and API contexts across multi-language projects, enabling localized content delivery. You can use it to build multilingual UIs and return per-locale API responses based on user language settings.

Where are default language resources stored in a Stacks application?

Default language resources are stored in the storage/framework/defaults/lang/ directory. Active language files are organized in the locales/ directory, while overall locale settings and configuration are managed in config/app.ts.