i18next-subliminal
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Introduction

Actions npm version

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.

locize

With using locize you directly support the future of i18next.


Package Sidebar

Install

npm i i18next-subliminal

Weekly Downloads

3,148

Version

1.0.0

License

MIT

Unpacked Size

46.5 kB

Total Files

27

Last publish

Collaborators

  • adrai
  • jamuhl