Skip to main content

Internationalization Command

The i18n command helps you manage internationalization (i18n) for your zopio project. This command provides tools for creating, updating, and managing translations across multiple languages.

Usage

Options

Examples

Initialize internationalization

This creates the initial configuration and directory structure for internationalization:

Add a new locale

This adds support for Turkish language to your project:

Extract translation keys

This scans your source files for translation keys and adds them to your translation files.

Synchronize translation files

This ensures all locales have the same keys, copying missing keys from the default locale.

Configuration

The internationalization system in zopio uses the following configuration files:

i18nConfig.ts

languine.json

Integration with Next.js

zopio uses next-international for middleware and next-intl for client-side translations. Here’s how to use translations in your components:

Server Components

Client Components

  • i18n-analyze - Analyze translation coverage across locales (plugin command)