@winstrike/next-i18next-koa
Version:
The easiest way to translate your NextJs apps. With Koa support only. Forked from 'next-i18next'.
18 lines (16 loc) • 667 B
JavaScript
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
import React from 'react';
import { Trans } from 'react-i18next';
export default class WrappedTrans extends React.Component {
render() {
const {
nextI18NextInternals
} = this.props;
const {
i18n
} = nextI18NextInternals;
return React.createElement(Trans, _extends({}, this.props, {
i18n: i18n
}));
}
}