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

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

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

// test 以外では使わないこと。インライン化されてるのでだいたい意味がない
export function updateI18n(newLocale: Locale) {
	i18n.locale = newLocale;
}