import * as React from 'react';
import i18next from '../utils/i18n';

const Translate = ({forKey, data = {}}) => {
  const translation = i18next.t(forKey, data);
  return (<span>{translation}</span>);
};

export const translate = ({forKey, data = {}}) => i18next.t(forKey, data);

export default Translate;
