Releases: aralroca/next-translate
0.13.0
This release introduces a new feature!!
Now is possible to use the language inside the getStaticProps, getStaticPaths, getServerSideProps and getInitialProps. 🚀 Read here more about it!
We also updated the docs to clarify some points and, thanks to @carme-carrillo, now we have a fancy logo of next-translate
!!! 🎉 It's very cool 😄
CHANGES
0.13.0-canary.3
0.13.0-canary.2
PATCHES
- Fix specialMethod detection #95
0.13.0-canary.1
CHANGES
- Inject lang into getStaticProps, getStaticPaths and getServerSideProps #93
0.12.0
Thanks to @BjoernRave for this release! 🎉
He introduced a new feature in the component next-translate/Link
, adding the prop noLang
to take the same behavior than next/link
without adding the language at the beginning, for example, to call some API routes. This is useful for consistency to always use the same Link component for navigation.
import Link from 'next-translate/Link'
// if "en" is the current language...
<Link href="/example">link</Link> // -> navigate to /en/example
<Link href="/example" noLang>link</Link> // -> navigate to /example
CHANGES
0.11.1
0.11.0
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 methodspushI18n
andreplaceI18n
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
0.11.0-canary.3
0.11.0-canary.2
PATCHES
- Fix issues about static mode redirectToLang=true #80
0.11.0-canary.1
CHANGES
- Support redirectToDefaultLang in static mode #79