1.3.1 • Published 7 days ago

@nitra/tf v1.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 days ago

@nitra/tf

usage with Vite (set import.meta.env.VITE_T to activate translation):

import tf from '@nitra/tf'

const tr = {
  'Привіт': 'Hello',
}

const t = tf.bind({ tr })

t`Привіт` // Hello

usage node (set process.env.VITE_T to activate translation):

import tf from '@nitra/tf'

const tr = {
  'Привіт': 'Hello',
}

const t = tf.bind({ tr })

t`Привіт` // Hello

usage webpack (set process.env.VITE_T to activate translation):

import tf from '@nitra/tf/webpack'

const tr = {
  'Привіт': 'Hello',
}

const t = tf.bind({ tr })

t`Привіт` // Hello

usage without environment variable:

import tf from '@nitra/tf/t'

const tr = {
  'Привіт': 'Hello',
}

const t = tf.bind({ tr, t: 1 })

t`Привіт` // Hello
1.3.1

7 days ago

1.3.0

4 months ago

1.2.4

5 months ago

1.2.0

12 months ago

1.2.3

11 months ago

1.2.2

11 months ago

1.2.1

11 months ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago