22 lines
379 B
TypeScript
22 lines
379 B
TypeScript
import { createI18n } from 'vue-i18n'
|
|
import en from './en.json'
|
|
import es from './es.json'
|
|
|
|
const i18n = createI18n({
|
|
legacy: false,
|
|
locale: 'es',
|
|
messages: {
|
|
en,
|
|
es,
|
|
},
|
|
})
|
|
|
|
// const translate = (key: string, context: any, plural: number = 1) => {
|
|
// return i18n.global.t(key, plural)
|
|
// }
|
|
|
|
export default i18n
|
|
|
|
const { t } = i18n.global
|
|
export { t, t as $t }
|