Skip to content

Commit 5984e96

Browse files
committed
docs: upd readme
1 parent d9979b9 commit 5984e96

File tree

2 files changed

+10
-356
lines changed

2 files changed

+10
-356
lines changed

getting-started.md

Lines changed: 0 additions & 247 deletions
This file was deleted.

readme.md

Lines changed: 10 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -13,71 +13,20 @@
1313

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

16-
It doesn't require extracting text into JSON files, and uses AI-powered API for content processing.
17-
1816
It comes in two parts:
1917

20-
1. **Replexica Compiler** - an open-source compiler plugin for React;
21-
1. **Replexica API** - an i18n API in the cloud that performs translations using LLMs. (Usage based, has a free tier.)
18+
1. **Replexica Compiler** - an open-source compiler plugin for React (experimental, Next.js App Router only);
19+
1. **Replexica API** - an i18n API in the cloud that performs translations using context-aware LLMs (Usage based, has a free tier.).
2220

2321
Replexica supports several i18n formats:
2422

25-
1. JSON-free Replexica compiler format;
23+
1. JSON-free, experimental Replexica Compiler format;
2624
1. `.md` files for Markdown content;
27-
1. Legacy JSON and YAML-based formats.
28-
29-
_Looking to jump right in? Check out the [Getting Started](/getting-started.md) guide for Next.js App Router!_
30-
31-
## Why
32-
33-
Having built tens of side-projects / micro-startups over the years, we found one thing to be particularly annoying: adding i18n to the app. We wanted to **ship, and ship fast**, not to mess with JSON files or extraction scripts.
34-
35-
So it got us thinking: why not build a tool that makes multi-language apps simpler? I mean, anyone who's tried to add i18n to their project knows it's a headache.
36-
37-
And after we found out [~80%](https://www.statista.com/chart/26884/languages-on-the-internet/#:~:text=The%201.46%20billion%20people%20who%20speak%20English%20still%20make%20up%20less%20than%2020%20percent%20of%20the%20world%20population) aren't fluent in English - that seemed like a missed opportunity, since i18n could be a shortcut to reaching more users, if only it was easier.
38-
39-
That's why we teamed up build a React compiler coupled with an AI-powered API, to make i18n as simple as possible, at the most fundamental level.
40-
41-
### Does Replexica work with ... ?
42-
43-
Please drop by our new [Discord channel](https://discord.gg/GeK6AuSqzw) and ask! Our co-founder Max is online almost 24/7.
44-
45-
## Quick Start
46-
47-
> [!NOTE]
48-
> This guide is for Next.js App Router apps only. Support for other setups is coming soon (ETA April 2024). <https://github.com/replexica/replexica/issues/25>
49-
50-
To give a general idea behind Replexica, here's **the only change that's needed** to the basic Next.js app to make it multi-language:
51-
52-
```js
53-
// next.config.mjs
54-
55-
// Import Replexica Compiler
56-
import replexica from '@replexica/compiler';
57-
58-
/** @type {import('next').NextConfig} */
59-
const nextConfig = {};
60-
61-
// Define Replexica configuration
62-
/** @type {import('@replexica/compiler').ReplexicaConfig} */
63-
const replexicaConfig = {
64-
locale: {
65-
source: 'en',
66-
targets: ['es'],
67-
},
68-
};
69-
70-
// Wrap Next.js config with Replexica Compiler
71-
export default replexica.next(
72-
replexicaConfig,
73-
nextConfig,
74-
);
75-
76-
```
25+
1. Classic JSON and YAML-based formats.
7726

7827
## Getting Started
7928

80-
We've prepared a [Getting Started](/getting-started.md) guide that walks you through the process of setting up Replexica Compiler with Next.js App Router. Check it out!
29+
Check out our [Docs](https://github.com/replexica/replexica/wiki) for more detailed guides on how to use Replexica with your app.
8130

8231
## What's under the hood
8332

@@ -101,61 +50,13 @@ Replexica is a full-stack LLM-powered i18n tool for React, and it consists of **
10150

10251
The core idea behind Replexica is simple: apps must be multi-language by default, from day one. **The Internet is global, and so must be any software that runs on it.**
10352

104-
## The Replexica Rule
105-
106-
At Replexica, we believe in the elegance of [Convention over configuration](https://en.wikipedia.org/wiki/Convention_over_configuration) principle.
107-
108-
Therefore, there's one important rule to remember when using Replexica:
109-
110-
**Always put translatable text inside `JSX`.**
111-
112-
**As long as you follow this rule**, the Replexica Compiler **will** automatically infer the metadata from your app and prepare the text inside JSX for translation.
113-
114-
**If you don't follow the rule** and decide to store some of your translatable content in variables, that **can** be translated too, but you'll need to manually wrap that text in a helper function.
115-
116-
So, if you want a hassle-free i18n on autopilot, **follow The Replexica Rule** whenever possible.
117-
118-
### Dynamic content
119-
120-
There's a common scenario, when you have an array of items that you render in a list:
121-
122-
```jsx
123-
const menuItems = [
124-
{
125-
title: 'Home',
126-
url: '/',
127-
},
128-
{
129-
title: 'About',
130-
url: '/about',
131-
},
132-
{
133-
title: 'Contact',
134-
url: '/contact',
135-
},
136-
];
137-
```
53+
## Why
13854

139-
In this case, you can still follow The Replexica Rule by simply wrapping the text in JSX! Here's how:
55+
Having built tens of side-projects / micro-startups over the years, we found one thing to be particularly annoying: adding i18n to the app. We wanted to **ship, and ship fast**, not to mess with JSON files or extraction scripts.
14056

141-
```jsx
142-
const menuItems = [
143-
{
144-
title: <>Home</>,
145-
url: '/',
146-
},
147-
{
148-
title: <>About</>,
149-
url: '/about',
150-
},
151-
{
152-
title: <>Contact</>,
153-
url: '/contact',
154-
},
155-
];
156-
```
57+
So it got us thinking: why not build a tool that makes multi-language apps simpler? I mean, anyone who's tried to add i18n to their project knows it's a headache.
15758

158-
The Replexica Compiler will automatically infer the metadata from the JSX and prepare the text for translation.
59+
That's why we teamed up build a React compiler coupled with an AI-powered API, to make i18n as simple as possible, at the most fundamental level.
15960

16061
## Roadmap
16162

@@ -200,7 +101,7 @@ We're a lean team of two:
200101
* **[Veronica](https://github.com/vrcprl)** - Product, Data Science, and LLMs.
201102
* **[Max](https://github.com/maxprilutskiy)** - React, Typescript, and Compilers.
202103

203-
We've also got a few (11 to be precise) contributors who signed up to help us with the project, and we're always looking for more. If you're interested in contributing, please drop by our Discord channel and say hi!
104+
We've also got a few (11 at the moment) contributors who signed up to help us with the project, and we're always looking for more. If you're interested in contributing, please drop by our Discord channel and say hi!
204105

205106
## Contributing
206107

0 commit comments

Comments
 (0)