How to use the soya-next/i18n.withLocale function in soya-next

To help you get started, we’ve selected a few soya-next examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github traveloka / soya-next / examples / i18n / components / Layout.js View on Github external
<a>{data[locale.language].menuAboutUs}</a>
      
    
    {children}
    <hr>
    
  
);

Layout.propTypes = {
  children: PropTypes.node,
  locale: localeShape.isRequired,
  siteLocales: PropTypes.arrayOf(PropTypes.string.isRequired).isRequired
};

export default withLocale(Layout);
github traveloka / soya-next / examples / i18n-with-redux / components / LanguagePicker.js View on Github external
<a style="{style}">
            
          </a>
        
      );
    })}
  
);

LanguagePicker.propTypes = {
  locale: localeShape.isRequired,
  siteLocales: PropTypes.arrayOf(PropTypes.string.isRequired).isRequired
};

export default withLocale(LanguagePicker);
github traveloka / soya-next / examples / i18n / components / LanguagePicker.js View on Github external
}
      return (
        
          <a style="{style}">{data[language].language}</a>
        
      );
    })}
  
);

LanguagePicker.propTypes = {
  locale: localeShape.isRequired,
  siteLocales: PropTypes.arrayOf(PropTypes.string.isRequired).isRequired
};

export default withLocale(LanguagePicker);