inlang (COPY OF GITHUB README)
Inlang makes i18n for your web apps as easy as:
-
installing the package
NPM npm install inlang **YARN**
yarn add inlang
-
await loadTranslations(<your project domain>,<locale>)
-
use the provided t(<text>)
function
-
(auto generate translations via the inlang dashboard)
import { loadTranslations, setTranslations, t } from 'inlang'
setTranslations(await loadTranslations('<your domain>', "de"))
console.log(t("How is the weather in Berlin?"))
>>> "Wie ist das Wetter in Berlin?"
Documentation
Head over to app.inlang.dev, create a project and follow the steps above.
For better UX and SEO, the translations should be prefetched via SSR (Server Side Rendering).
You can find an in depth documentation for the following frameworks: