"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useI18n = useI18n;
var _react = require("react");
var _OxyContext = require("../context/OxyContext");
var _i18n = require("../../i18n");
function useI18n() {
  const {
    currentLanguage
  } = (0, _OxyContext.useOxy)();
  const t = (0, _react.useMemo)(() => {
    return (key, vars) => (0, _i18n.translate)(currentLanguage, key, vars);
  }, [currentLanguage]);
  return {
    t,
    locale: currentLanguage
  };
}
//# sourceMappingURL=useI18n.js.map