mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-22 06:49:35 +00:00
Initial commit
This commit is contained in:
commit
d76f4258f7
231 files changed
+27803
No files matched your search
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user