Skip to content

0.11.0

Compare
Choose a tag to compare
@aralroca aralroca released this 14 Mar 15:38
· 454 commits to master since this release
f736338

This release have some new features, thanks to @justincy and @BjoernRave for these contributions!

🎉 New API things

Proposed by @justincy in #78 and by @BjoernRave in #43, and implemented by @aralroca .

  • Link -> Wrapper of next/link to navigate to any page with the current language. Read more about it here.
  • Router -> Wrapper of next/router with two extra methods pushI18n and replaceI18n to navigate to any page with the current language. Read more about it here.
  • clientSideLang -> Useful in some cases to get the current language outside the components. Caveats: don't use it in server-side. Read more about it here.

Improvement of redirectToDefaultLang config

Before was applied only in the i18nMiddleware, with a custom server, doing a 301 redirect from /some/route to /en/some/route (if en is de default language). However, thanks to @justincy contribution now this config also it applies in static mode, doing a redirect on the browser (Router.replace).

CHANGES

  • Support redirectToDefaultLang in static mode #79 #80 #82
  • Update yarn.lock for security reasons #85
  • Add Link, Router and clientSiteLang to API #84
  • Update docs in README.md #83