iOS_Logo_1024x1024-100.png
  • Home
  • Examples
    Native features
    SSR (getServerSideProps)SSGSSG using fallbackSSG using revalidateCatch-all routes
    Built-in features
    HostingStages & secretsCI/CDStatic i18nMonitoringAPI (Airtable)CSS-in-JSCookies consentAnalyticsIconsCSS AnimationsUI components libraryDocs siteMarkdown as JSX
    Built-in utilities
    I18nLink componentAirtableAsset componentHooksHOCsAPIErrors handlingBundle analysisSVG to ReactSecurity auditTracking useless re-renders
  • Documentation
  • Source code
  • Go to CMS

Built-in utilities

  • I18nLink component
  • AirtableAsset component
  • Hooks
  • HOCs
  • API
  • Errors handling
  • Bundle analysis
  • SVG to React
  • Security audit
  • Tracking useless re-renders

Previous section - Home

I18nLink component examples

<I18nLink /> component is based on Next.js native <Link /> component.
It's an utility that automatically handles localisation and acts as a wrapper for <Link />.
If you'd use the <Link /> component, you'd have to provide which locale is the current locale, and build the link accordingly.
That's basically what <I18nLink /> does.

This is a link going to the same page (keeps the current locale)
This is a link going to the same page (forces to switch to fr-FR locale)
This is a link going to the same page (forces to switch to en-US locale)

1 2 3 4 5 6 7 8 9 10 11 <I18nLink href={'/demo/built-in-utilities/i18nLink-component'}> This is a link going to the same page (keeps the current locale) </I18nLink> <I18nLink href={'/demo/built-in-utilities/i18nLink-component'} locale={'fr-FR'}> This is a link going to the same page (forces to switch to <code>fr-FR</code> locale) </I18nLink> <I18nLink href={'/demo/built-in-utilities/i18nLink-component'} locale={'en-US'}> This is a link going to the same page (forces to switch to <code>en-US</code> locale) </I18nLink>
iOS_Logo_1024x1024-100.png

Uber 12 - 2021
All rights reserved

Terms
Politique de confidentialité
/static/images/LOGO_Powered_by_UNLY_BLACK_BLUE.svg