AI-powered i18n Toolkit For React – Replexica

Description:

Replexica is an i18n toolkit for React, to ship multi-language apps fast.

It doesn’t require extracting text into JSON files, and uses AI-powered API for content processing.

It comes in two parts:

  1. Replexica Compiler – an open-source compiler plugin for React;
  2. Replexica API – an i18n API in the cloud that performs translations using LLMs. (Usage based, has a free tier.)

And supports several i18n formats:

  1. JSON-free Replexica compiler format;
  2. .md files for Markdown content;
  3. Legacy JSON and YAML-based formats.

Basic usage:

// Import Replexica Compiler
import replexica from '@replexica/compiler';
/** @type {import('next').NextConfig} */
const nextConfig = {};
// Define Replexica configuration
/** @type {import('@replexica/compiler').ReplexicaConfig} */
const replexicaConfig = {
  locale: {
    source: 'en',
    targets: ['es'],
  },
};
// Wrap Next.js config with Replexica Compiler
export default replexica.next(
  replexicaConfig,
  nextConfig,
);
Tags:

Add Comment