"use strict";

import { useMemo } from 'react';
import { useOxy } from '../context/OxyContext';
import { translate } from '../../i18n';
export function useI18n() {
  const {
    currentLanguage
  } = useOxy();
  const t = useMemo(() => {
    return (key, vars) => translate(currentLanguage, key, vars);
  }, [currentLanguage]);
  return {
    t,
    locale: currentLanguage
  };
}
//# sourceMappingURL=useI18n.js.map