Skip to content

Installation

WARNING

We recommend scaffolding your project with your favorite web framework before installing Psitta, followed by integrating it with a Web framework for a seamless experience.

NOTE

Psitta is an ESM-only package. Don't use require() to import it, and make sure your nearest package.json contains "type": "module", or change the file extension of your relevant files to .mjs/.mts. Refer to Vite's troubleshooting guide for more details. Also, inside async CJS contexts, you can use await import('@psitta/core') instead.

Prerequisites

Ensure that you have the following prerequisites:

Official Web Framework Integration

Psitta provides official integrations for Vue and React. These integrations offer features such as locale state management, a versatile component for localizing content with slots, hooks/composables for easy localization, and more.

sh
  $ pnpm add @psitta/core @psitta/{framework}
sh
  $ npm install @psitta/core @psitta/{framework}
sh
  $ yarn add @psitta/core @psitta/{framework}
sh
  $ bun install @psitta/core @psitta/{framework}

After installation, proceed to the Configure Guide to set up Psitta for your project.

Your Own Integration advanced

If you prefer manual setup or are not using a Web framework, you can install Psitta directly in your project using one of the following package managers:

sh
  $ pnpm install @psitta/core
sh
  $ npm install @psitta/core
sh
  $ yarn install @psitta/core
sh
  $ bun install @psitta/core

After installing Psitta Core, you can implement locale state management, localization functions, locale detection, and more according to your project's needs. Psitta Core includes utilities for implementing i18n. Here are some useful reference links for implementing your integration: