Skip to main content

Welcome to i18n-keyless

Install i18n-keyless in less than 5 minutes.

Get an API key by visiting https://i18n-keyless.com/#get-api-key

Using an AI assistant?

The whole documentation is also available as a single Markdown file at /llms.txt — paste it into Claude / ChatGPT / Cursor / etc. to give your assistant full context on i18n-keyless.

Getting Started

i18n-keyless is a JavaScript library that works across different environments. Choose your platform below to see the specific setup instructions:

Storage is required to cache translations.

You'll need to install the required dependency:

npm install i18n-keyless-react
import * as I18nKeyless from "i18n-keyless-react";

I18nKeyless.init({
API_KEY: "YOUR_API_KEY",
storage: window.localStorage, // or whatever has get/set/del methods, check the codebase below
languages: {
primary: "fr",
supported: ["en", "fr"],
},
});

You can check here for the methods that your storage item needs to have

Usage

Once you've initialized i18n-keyless for your platform, you can start translating text immediately:

import { I18nKeyless, getTranslation } from "i18n-keyless-react";
import { TabBar, Tab } from "whatever-tab-bar-system";

// Two ways to display text: `I18nKeyless` component / `getTranslation` function

// `I18nKeyless` component
function Header() {
return (
<h1><I18nKeyless>Bonjour le monde</I18nKeyless></h1>
);
}

// `getTranslation` function
function MyTabs() {
return (
<TabBar>
<Tab label={getTranslation("Premier onglet")} />
<Tab label={getTranslation("Deuxième onglet")} />
</TabBar>
);
}