- The output format is now in JSON v4. To convert your existing translations to the new v4 format, have a look at i18next-v4-format-converter or this web tool.
reactNamespaceoption is gone. To use jsx in js file, overwrite the lexer.
- Drop support for Node 6 and 8 (EOL)
- Jade is not being tested anymore. If this is something you need, please make a PR with a Lexer for it
regexoption was deprecated. If you need to support a custom file format, please make a PR with a Lexer for itignoreVariableswas deprecated. Keys that are not string litterals now emit a warningwriteOldwas renamedcreateOldLibraries. It defaults totrue.namespacewas renameddefaultNamespace. It defaults totranslation.prefixwas deprecated. Useoutputsuffixwas deprecated. Useoutputfilenamewas deprecated. Useoutputextensionwas deprecated. Useoutput- catalogs are no longer sorted by default. Set
sorttotrueto enable this.
defaultValue: replace empty keys with the given valueoutputsupport for$NAMESPACEand$LOCALEvariablesindentationlet you control the indentation of the catalogslineEndinglet you control the line ending of the catalogssortlet you enable sorting.
Instead of writing a single regex to match all use cases or to run many regexes on all files, the new version introduce the concept of "Lexer". Each file format has its own Lexer. It adds some code but reduces complexity a lot and improves maintainability.
i18next input:outputsyntax was deprecated. Use the--outputoptionrecursivewas deprecated. You can now pass a globdirectoryFilterwas deprecated. You can now pass a globfileFilterwas deprecated. You can now pass a glob
i18next src --recursive --fileFilter '*.hbs,*.js' --directoryFilter '!.git'
i18next 'src/**/*.{js,hbs}' '!.git'