i18n-messages-generator
v1.0.31
Published
i18n messages generator from languages files
Downloads
7
Readme
i18n-messages-generator
Generate i18n messages from lang folder
Install
yarn add i18n-messages-generator
Or
npm install i18n-messages-generator
How to use it
import getMessages from 'i18n-messages-generator';
const messages = getMessages(require.context('./lang', true, /(.js){0,1}(.ts){0,1}$/i))
const i18n = VueI18n.createI18n({
locale: 'fr', // set locale
fallbackLocale: 'en', // set fallback locale
messages, // set locale messages
// If you need to specify other options, you can set other options
// ...
})