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:
- Replexica Compiler – an open-source compiler plugin for React;
- Replexica API – an i18n API in the cloud that performs translations using LLMs. (Usage based, has a free tier.)
And supports several i18n formats:
- JSON-free Replexica compiler format;
.mdfiles for Markdown content;- 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,
);