use react i18n outside component code example Example: react i18n outside component import i18n from "./i18n" i18n.t(...);