Git Product home page Git Product logo

i18next-subliminal's Introduction

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.


i18next-subliminal's People

Contributors

adrai avatar

Watchers

Jan Mühlemann avatar  avatar Julian Grinblat avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.