react-i18nify
Version:
Simple i18n translation and localization components and helpers for React.
14 lines (10 loc) • 313 B
JavaScript
import translate from '../lib/translate';
import BaseComponent from './Base';
class Translate extends BaseComponent {
render() {
const { value, locale, ...otherProps } = this.props;
const translation = translate(value, otherProps, { locale });
return translation;
}
}
export default Translate;