Simple i18n tagged template strings.
Simple i18n tagged template strings. Inspired by Jack Hsu's blog post.
npm install --save i18n-tag
i18n.js
import { createI18n } from 'i18n-tag';
const vocabulary_ru = {
'{0} parrots': '{0} попугаев'
};
export default createI18n(vocabulary_ru);
index.js
import i18n from './i18n';
const n = 38;
console.log(i18n`${n} parrots`);