Introduction
This package helps to pass meta information via invisible characters for the shown translation resources.
Getting started
Source can be loaded via npm.
# npm package
$ npm install i18next-subliminal
Wiring up as i18next plugin:
import i18next from 'i18next'
import { PostProcessor } from 'i18next-subliminal'
i18next.use(PostProcessor).init({
postProcess: 'subliminal',
postProcessPassResolved: true,
})
standalone usage:
import { wrap, unwrap, containsHiddenMeta } from 'i18next-subliminal'
const wrapped = wrap('my text', { key: 'my.key', ns: 'my-ns', lng: 'en', source: 'translation' })
const unwrapped = unwrap(wrapped)
unwrapped.text // 'my text'
unwrapped.invisibleMeta // { key: 'my.key', ns: 'my-ns', lng: 'en', source: 'translation' }
containsHiddenMeta(wrapped) // true
Gold Sponsors
From the creators of i18next: localization as a service - locize.com
A translation management system built around the i18next ecosystem - locize.com.
With using locize you directly support the future of i18next.