@skyra/i18next-backend
TypeScript icon, indicating that this package has built-in type declarations

2.0.5 • Public • Published

@skyra/i18next-backend

A fast and modern filesystem-based i18next backend for Node.js.

Usage

import { Backend } from '@skyra/i18next-backend';
import i18next from 'i18next';

i18next.use(Backend);

await i18next.init({
	backend: {
		paths: [
			// Using a string:
			'/locales/{{lng}}/{{ns}}.json',
			// Using an URL:
			new URL('/locales/{{lng}}/{{ns}}.json', import.meta.url),
			// Using a function:
			(lng, ns) => `/locales/${lng}/${ns}.json`
		]
	}
	// ... i18next options
});

Package Sidebar

Install

npm i @skyra/i18next-backend

Weekly Downloads

914

Version

2.0.5

License

Apache-2.0

Unpacked Size

34.2 kB

Total Files

9

Last publish

Collaborators

  • favna
  • kyranet