Skip to content

Importing only specific languages

Tyler Vigario edited this page Jun 4, 2023 · 5 revisions

Description

Each language file is designed to run independently and thus you can include only the language files you need.

Examples

English only

import n2words from 'n2words/i18n/en.js'

n2words(100)

Arabic only

import n2words from 'n2words/i18n/ar.js'

n2words(100)

English and Spanish

import n2wordsEN from 'n2words/i18n/en.js'
import n2wordsES from 'n2words/i18n/es.js'

n2wordsEN(100)
n2wordsES(100)