Initial commit

This commit is contained in:
Matej Glasnák committed 2022-11-21 05:42:38 +01:00
commit d76f4258f7
231 files changed
+27803

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
import { Options } from './types'
import { I18n } from './models/i18n'
import events from '@/plugins/w/events'
export default {
install: (app, options: Options) => {
if (options && options.disabled === true)
return
if (!options || !options.languages || !options.defaultLanguage)
return console.warn('[@wezeo/i18n] Could not initialize i18n. Missing configuration options.')
if (!app.config.globalProperties.eventBus) {
app.use(events)
}
const i18n = new I18n(options)
app.use(i18n.vendorI18n)
app.config.globalProperties.$w18n = i18n
}
}