Skip to content

Latest commit

 

History

History
134 lines (110 loc) · 35.1 KB

plugins-and-utils.md

File metadata and controls

134 lines (110 loc) · 35.1 KB

Plugins and Utils

i18n formats

While the i18next format (JSON based) is the preferred solution and widely supported in translation management tools like locize.com, you might prefer another exciting format, like:

name format description
i18next-fluent fluent i18nFormat plugin to use mozilla fluent format with i18next
i18next-icu ICU i18nFormat plugin to use ICU format with i18next based on yahoo/intl-messageformat
i18next-polyglot polyglot i18nFormat plugin to use airbnb/polyglot.js format with i18next
i18next-shopify Shopify json format It allows developers to use the same format used by Shopify apps and themes for localization

In general, using an i18n format plugin, will remove the i18next specific format functionality, like plurals, interpolation, context, etc... you need to use the format requested in the used i18n format.

extraction tools

name description
i18next-scanner Scan your code, extract translation keys/values, and merge them into i18n resource files.
i18next-parser A simple command line and gulp plugin that lets you parse your code and extract the translations keys in it.
babel-plugin-i18next-extract A babel plugin that can extract keys in JSONv4 format.
translation-check Nicely shows an overview of your translations in a UI. Check which keys are not yet translated.

utils

util type description
i18next-gettext-converter converter Converts gettext .mo or .po to 18next json format and vice versa.
csv2i18next converter Convert CSV files to JSON & YAML for i18next.js
i18next-json-csv-converter converter Convert between CSV files and JSON format for i18next
resx2i18next converter Convert ResX-files to json resources compatible with i18next
i18nextResourceGenerator extractor Intellij IDEA Plugin for i18next resource generation
aurelia-i18next-parser extractor Extracts i18n keys and values from source files.
grunt-i18next bundler bundle language resource files for i18next
i18next-gettext-loader bundler Convert gettext PO files into i18next JSON format during webpack builds
i18next-po-loader bundler Load gettext PO files as i18next format directly in webpack
i18next-loader bundler webpack loader that can translate your code and generate bundle per each language
@alienfast/i18next-loader bundler This webpack loader generates the resources structure necessary for i18next. The structure is webpacked with the client bundle at build time, thus avoiding loading any language resources via extra HTTP requests.
vite-plugin-i18next-loader bundler Vite plugin to client bundle i18next locales composited from one to many json/yaml files from one to many libraries. Zero config HMR support included.
webpack i18next-resource-store-loader bundler This loader generates the resStore config needed for i18next to avoid loading language resources via extra HTTP requests. It generates this config given a directory.
ya-i18next-webpack-plugin bundler Yet another i18next webpack plugin. This plugin collects keys from webpack parsing phase, saves missing translations into specified path, copies translation files.
rollup-plugin-i18next-conv bundler/converter Import .po files with rollup
i18next-static-analysis util analyse statically your code to find calls to i18next and validates them for all your supported languages
i18next-json-sync util Keep i18next JSON resource files in sync with source language file
i18next-locales-sync util Syncs i18next locale resource files against a primary language. Supports namespaces, plural forms and key sorting.
eslint-plugin-i18next util Make sure that all text shown are translated
i18next support for JetBrains IDEs IDE integration Navigation, code completion, highlighting
i18next support for Visual Studio Code IDE integration Extract, Visualize, Edit, Lint
i18next-hmr bundler / DX Webpack / Vite HMR plugin to reload translation resources on client & server
translation-check util / DX Nicely shows an overview of your translations in a UI. Check which keys are not yet translated.
i18next-v4-format-converter converter Convert old i18next translation resources to the new i18next v4 json format. Via CLI or programmatically.
i18next-v4-format-converter-web online-converter Convert old i18next translation resources to the new i18next v4 json format directly in your browser.
Intellij idea i18next support plugin Intellij idea i18next support plugin.
i18next-ts-loader bundler / DX Webpack loader to fetch locale files with ES6 modules, supporting autocomplete, type checking, HMR and content based hashing

services

Services that are known to fully support the i18next format (plural handling, ...) and sponsoring or contributing to the development of i18next.

name description
locize localization as a service. Solves your localization process using i18next.

backend extenders

backend description
chained backend combine multiple of the existing backends for fallback and caching scenarios
i18next-multiload-backend-adapter enable another backend's multiload behaviour of loading multiple lng-ns combinations with one request. This behaviour was removed from i18next >=v11.0.0 and could be enabled again by using this adapter

backends

backend description
localstorage backend This is a i18next cache layer to be used in the browser. It will load and cache resources from localStorage and can be used in combination with the chained backend.
async storage backend This is a i18next cache layer to be used in react native. It will load and cache resources from AsyncStorage and can be used in combination with the chained backend.
filesystem

backend layer for i18next used in Node.js and for Deno to load translations from the filesystem.

It can also be used as cache layer in combination with the chained backend, i.e. a chained backend together with the http backendor with the locize backend.

http backend backend layer for i18next using in node.js, in the browser and for deno (will use xhr or fetch)
xhr backend backend layer for i18next using browsers xhr deprecated
fetch backend backend layer for i18next using browsers fetch
fluent backend backend to load fluent syntax .ftl files via xhr
keys ondemand fetch missing keys on demand
mongodb backend backend layer for i18next used in Node.js & Deno to load translations from the MongoDB.
Firestore backend backend layer for i18next used in Node.js & Deno to load translations from Google's Firestore DB.
nodejs filesystem node.js backend layer for i18next using fs module to load resources from filesystem
nodejs filesystem (electron) node.js backend for i18next using fs module to load resources securely in an electron app from filesystem
nodejs remote node.js backend layer for i18next using request module to load resources from another server
nodejs couchbase i18next node.js backend layer for i18next using couchbase
Zanata nodejs backend i18next node.js backend layer for Zanata
i18next-firebase-backend i18next Backend Using Firebase
i18next-smart-bucket-backend i18next backend for smart-bucket
locize backend backend layer for locize.com - localization as a service
service backend backend layer for external services such as spacetranslate.com - Simple Translation Service at Scale and locize.com - localization as a service.
locize nodejs backend backend layer for locize.com - localization as a service
service node backend backend layer for external services such as spacetranslate.com - Simple Translation Service at Scale and locize.com - localization as a service.
webpack import backend Use webpack code splitting to load files as a javascript bundle
Transifex backend i18next backend for Transifex Native
i18next-resources-to-backend This package helps to transform resources to an i18next backend.

language detector

language detector description
universal (browser + nodejs) Language detector that works universally (browser + server) - Meant to be used with a universal framework, such as Next.js
browser language detector used in browser environment for i18next
http language detector for "any" http backend, also for Deno
nodejs koa A i18next language detecting plugin for Koa framework.
react native localization settings language detector for React Native that uses native per-app language API to enable language change in system preferences.
react native language detector for React Native.
react native Async Storage language detector for React Native that saves the user's choice in Async Storage, used for persistence.
electron language detector for electron apps.
CLI language detector for CLI.

post processors

post processor description
sprintf post processor sprintf post processor for i18next.
interval plurals interval based plurals like. "One Item", "A few items", "A lot of items"
i18next-react-postprocessor embed React elements inside your i18next translation strings
i18next-korean-postposition-processor i18next post-processor for processing korean postposition
i18next-pseudo i18next post-processor for pseudolocalization of strings
i18next-emoji-postprocessor i18next postProcessor plugin for Node.js and in the browser that replaces all words with emojis.

loggers

Only the integrated console logger is available for now.

Create your own plugin

Want to create your own plugins? Learn more here.