Bot releases are hidden (Show)
Published by aralroca over 4 years ago
Published by aralroca over 4 years ago
Published by aralroca over 4 years ago
Published by aralroca over 4 years ago
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
Published by aralroca over 4 years ago
Published by aralroca over 4 years ago
This release have some new features, thanks to @justincy and @BjoernRave for these contributions!
Proposed by @justincy in #78 and by @BjoernRave in #43, and implemented by @aralroca .
next/link
to navigate to any page with the current language. Read more about it here.next/router
with two extra methods pushI18n
and replaceI18n
to navigate to any page with the current language. Read more about it here.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).
Published by aralroca over 4 years ago
redirectToDefaultLang
in static mode: render home before Router.replace #82Published by aralroca over 4 years ago
Published by aralroca over 4 years ago
Published by aralroca over 4 years ago
Published by aralroca over 4 years ago
Published by aralroca over 4 years ago
Published by aralroca over 4 years ago
Published by aralroca over 4 years ago
Published by aralroca over 4 years ago
Published by aralroca over 4 years ago
Published by aralroca over 4 years ago
Note: Requires next version >= 9.2.3
Published by aralroca over 4 years ago
Published by aralroca over 4 years ago
Published by aralroca over 4 years ago
yarn install next-translate
to yarn add next-translate
in README