summaryrefslogtreecommitdiff
path: root/packages/frontend/src/i18n.ts
blob: 6ad503b0898a53004660609444b91ddaba9ea160 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
 * SPDX-FileCopyrightText: syuilo and misskey-project
 * SPDX-License-Identifier: AGPL-3.0-only
 */

import { markRaw } from 'vue';
import { I18n } from '@@/js/i18n.js';
import type { Locale } from '../../../locales/index.js';
import { locale } from '@@/js/config.js';

export const i18n = markRaw(new I18n<Locale>(locale, _DEV_));

export function updateI18n(newLocale: Locale) {
	i18n.locale = newLocale;
}