Initialize the I18n instance
mainTo use the library, instantiate the I18n class with a translations object. The object structure follows the Ruby on Rails i18n format, where each root key represents a locale (e.g., en, pt-BR, or zh-Hant-TW).
You can provide a full translation object or a basic one for simple use cases.
import { I18n } from "i18n-js";
import translations from "./translations.json";
const i18n = new I18n(translations);