You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

functions.js 372B

123456789101112
  1. import { translate as reactTranslate } from 'react-i18next';
  2. /**
  3. * Wrap a translatable component.
  4. *
  5. * @param {Component} component - the component to wrap
  6. * @returns {Component} the wrapped component.
  7. */
  8. export function translate(component) {
  9. // use the default list of namespaces
  10. return reactTranslate([ 'main', 'languages' ], { wait: true })(component);
  11. }