Example #

Import the createI18n function into your Javascript main file:

import { createI18n } from 'https://cdn.skypack.dev/ficusjs@3'

Create a new I18n instance:

main.js

const i18n = createI18n()

i18n.add({ greeting: 'Hello FicusJS' }, 'en')

const value = i18n.t('greeting')

// value is 'Hello FicusJS'