Files
VRCT/src-ui/plugins/dev_plugin_subtitles/locales/initI18n.js
2025-04-26 01:55:28 +09:00

14 lines
490 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import en from "./en.yml";
import ja from "./ja.yml";
import plugin_info from "../plugin_info.json";
export const initI18n = (i18n) => {
const ns = plugin_info.plugin_id;
// parse once
const en_res = en;
const ja_res = ja;
// addResourceBundle will merge into i18ns store
i18n.addResourceBundle("en", ns, en_res, /* deep = */ true, /* overwrite = */ true);
i18n.addResourceBundle("ja", ns, ja_res, /* deep = */ true, /* overwrite = */ true);
};