Skip to content

i18next/i18next-emoji-postprocessor

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Introduction

Actions Travis npm version

This is a postProcessor plugin for i18next using in Node.js and in the browser that replaces all words with emojis.

It's mainly used for fun!

Getting started

Source can be loaded via npm or downloaded from this repo.

# npm package
$ npm install i18next-emoji-postprocessor

Wiring up:

import i18next from 'i18next';
import emoji from 'i18next-emoji-postprocessor';

i18next.use(emoji).init(i18nextOptions);
  • If you don't use a module loader it will be added to window.i18nextEmojiPostProcessor

usage sample

// your normal resources
// translation: {
//   key: 'Hello world!'
// }

i18next.t('key', { postProcess: 'emoji' });
// --> '⭕ 🌐'

Using global options

import i18next from 'i18next';
import emoji from 'i18next-emoji-postprocessor';

i18next
  .use(emoji)
  .init({
    postProcess: 'emoji'
  });

// your normal resources
// translation: {
//   key: 'Hello world!'
// }

i18next.t('key');
// --> '⭕ 🌐'

Gold Sponsors

About

This is a postProcessor plugin for i18next using in Node.js and in the browser that replaces all words with emojis.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published