i18next documentation
🏠 i18next🌐 localization as a service🎓 i18next crash course💾 GitHub Repository
  • Introduction
  • Overview
    • Getting started
    • Comparison to others
    • API
    • Configuration Options
    • Supported Frameworks
    • Plugins and Utils
    • For Enterprises
    • First setup help
    • TypeScript
  • Translation Function
    • Essentials
    • Interpolation
    • Formatting
    • Plurals
    • Nesting
    • Context
    • Objects and Arrays
  • Principles
    • Best Practices
    • Translation Resolution
    • Namespaces
    • Fallback
    • Plugins
  • How to
    • Add or Load Translations
    • Extracting translations
    • Caching
    • Backend Fallback
    • FAQ
  • Misc
    • JSON Format
    • Creating own Plugins
    • Migration Guide
    • The history of i18next
    • Testimonials
  • 🌐localization as a service
  • 🎓i18next crash course
  • 💾GitHub Repository
Powered by GitBook
On this page
  • For which environment are you looking for an i18n solution?
  • Special handling for serverless environments (AWS lambda, Google Cloud Functions, Azure Functions, etc...)
  • Do you need a language detector for your environment?
  • Do you want to bundle the translations with your app?
  • Do you want to load the translations separate from your app via http?
  • Do you want to manage your translations with an awesome translation management system?
  • Ready to take i18next to the next level?
  1. Overview

First setup help

Let's try to figure out what you need.

Last updated 3 months ago

For which environment are you looking for an i18n solution?

, , , , , , , ...

There are a lot of appropriate libraries.

Special handling for serverless environments (AWS lambda, Google Cloud Functions, Azure Functions, etc...)

Make use of

import i18next from 'i18next';
import Backend from 'i18next-fs-backend';

const backend = new Backend({
  // path where resources get loaded from
  loadPath: '/locales/{{lng}}/{{ns}}.json'
});

i18next
  .use(backend)
  .init({
    // initImmediate: false, // setting initImediate to false, will load the resources synchronously
    ...opts,
    ...yourOptions
  }); // yourOptions should not include backendOptions!
import i18next from 'i18next';
import en from './locales/en.json'
import de from './locales/de.json'

i18next
  .init({
    ...opts,
    ...yourOptions,
    resources: {
      en,
      de
    }
  });

Do you need a language detector for your environment?

Do you want to bundle the translations with your app?

Do you want to load the translations separate from your app via http?

Do you want to manage your translations with an awesome translation management system?

or just your files directly

for example for the browser:

for example for http server (express, Fastify, etc...):

on server side:

served from your own endpoint:

served from a professional CDN of a translation management system:

For which environment are you looking for an i18n solution?
Special handling for serverless environments (AWS lambda, Google Cloud Functions, Azure Functions, etc...)
Do you need a language detector for your environment?
Do you want to bundle the translations with your app?
Do you want to load the translations separate from your app via http?
Do you want to manage your translations with an awesome translation management system?
Client
server
browser
React
mobile
desktop
Node.js
Deno
Have a look at this list.
i18next-fs-backend
import/require
i18next-browser-languageDetector
i18next-http-middleware
there are other plugins here
you can add translations on init
you can add translations after init
you can lazy load translations via dynamic import
you can load translations from filesystem
i18next-http-backend
i18next-locize-backend
there are a lot of other backend possibilities here
Ready to take i18next to the next level?