Releases: i18next/i18next-scanner
Releases · i18next/i18next-scanner
v1.8.0
v1.7.0
New options for handling context and plural form keys (ee05a40, resolves #38)
Default Options
context
Type: Boolean
Default: true
Whether to add context form key.
contextFallback
Type: Boolean
Default: true
Whether to add a fallback key as well as the context form key.
contextSeparator
Type: String
Default: '_'
The character to split context from key.
plural
Type: Boolean
Default: true
Whether to add plural form key.
pluralFallback
Type: Boolean
Default: true
Whether to add a fallback key as well as the plural form key.
pluralSeparator
Type: String
Default: '_'
The character to split plural from key.
v1.6.0
v1.5.1
v1.5.0
v1.4.1
v1.4.0
- Adds
nsSeparator
andkeySeparator
options to parser.set() that provides the ability to override global options (74a0773)
const parser = new Parser({
defaultValue: '__NOT_TRANSLATED__',
nsSeparator: ':',
keySeparator: '.'
});
parser.set('translation:key1.key2', { keySeparator: false });
console.log(parser.get());
// {
// en: {
// translation: {
// "key1.key2": "__NOT_TRANSLATED__"
// }
// }