Skip to main content

Install Saykit

Install the core Saykit package and any framework-specific packages you need:
npm install saykit

Available Packages

Saykit provides several packages for different use cases:

Core Packages

  • saykit - Core runtime library with the Say class 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 transform say template literals into message calls
  • unplugin-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

Install the React integration and Babel plugin:
npm install saykit @saykit/react
npm install -D @saykit/config @saykit/babel-plugin
Configure Babel by creating or updating .babelrc:
.babelrc
{
  "presets": ["next/babel"],
  "plugins": ["@saykit/babel-plugin"]
}

Next Steps

After installation, you’ll need to:
  1. Create a saykit.config.ts file to configure your locales and message extraction
  2. Set up your Say instance and start adding translatable messages
  3. Use the CLI to extract, compile, and build your translations
Continue to the Quickstart guide to learn how to use Saykit in your project.

Build docs developers (and LLMs) love