Files
VRCT/src-ui/plugins/dev_plugin_subtitles/locales/initI18n.js
Sakamoto Shiina c665f1d355 [Update/bugfix] Plugins: Add localization system to plugins list(plugin_info.json).
Fix the issue that the i18n didn't work in development environment.
2025-04-26 05:01:30 +09:00

11 lines
415 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;
// addResourceBundle will merge into i18ns store
i18n.addResourceBundle("en", ns, en, /* deep = */ true, /* overwrite = */ true);
i18n.addResourceBundle("ja", ns, ja, /* deep = */ true, /* overwrite = */ true);
};