Install Saykit
Install the core Saykit package and any framework-specific packages you need:Available Packages
Saykit provides several packages for different use cases:Core Packages
saykit- Core runtime library with theSayclass and message formatting@saykit/config- Configuration schema and CLI tools for extracting, compiling, and building translations
Framework Integrations
@saykit/react- React integration with<Say>component and hooks for client and server components@saykit/carbon- Carbon integration for Discord bots with command localization support
Build Tools
@saykit/babel-plugin- Babel plugin to transformsaytemplate literals into message callsunplugin-saykit- Universal plugin for Vite, Webpack, Rollup, esbuild, and more
Translation Formats
@saykit/format-po- Default PO (Portable Object) file format parser and serializer
Framework-Specific Setup
- React (Next.js with Babel)
- Vite / Rollup / Webpack
- Vanilla JavaScript
Install the React integration and Babel plugin:Configure Babel by creating or updating
.babelrc:.babelrc
Next Steps
After installation, you’ll need to:- Create a
saykit.config.tsfile to configure your locales and message extraction - Set up your
Sayinstance and start adding translatable messages - Use the CLI to extract, compile, and build your translations