-
Notifications
You must be signed in to change notification settings - Fork 22
Importing only specific languages
Tyler Vigario edited this page Jul 7, 2024
·
6 revisions
Each language file is designed to run independently, so you can include only the language files you need.
import n2words from 'n2words/i18n/en.js'
n2words(100)
import n2words from 'n2words/i18n/ar.js'
n2words(100)
import n2wordsEN from 'n2words/i18n/en.js'
import n2wordsES from 'n2words/i18n/es.js'
n2wordsEN(100)
n2wordsES(100)
import('n2words/i18n/en.js').then(({ default: n2words }) => {
n2words(100)
})
<script src="./en.js"></script>
<script>
n2words(100)
</script>