Skip to content

Releases: aralroca/next-translate

0.13.0-canary.3

24 Mar 16:27
8ac764f
Compare
Choose a tag to compare
0.13.0-canary.3 Pre-release
Pre-release

CHANGES

  • Add lang into getInitialProps #97
  • Update logo + docs #96

0.13.0-canary.2

24 Mar 08:54
a182c35
Compare
Choose a tag to compare
0.13.0-canary.2 Pre-release
Pre-release

PATCHES

  • Fix specialMethod detection #95

0.13.0-canary.1

24 Mar 06:16
0639694
Compare
Choose a tag to compare
0.13.0-canary.1 Pre-release
Pre-release

CHANGES

  • Inject lang into getStaticProps, getStaticPaths and getServerSideProps #93

0.12.0

21 Mar 15:03
49d2041
Compare
Choose a tag to compare

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

  • Allow disable lang on Link #89
  • Update deps #90

0.11.1

16 Mar 18:54
Compare
Choose a tag to compare

PATCHES

  • Fix error when Router options is undefined #86

0.11.0

14 Mar 15:38
f736338
Compare
Choose a tag to compare

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

0.11.0-canary.3

14 Mar 13:27
937dfb6
Compare
Choose a tag to compare
0.11.0-canary.3 Pre-release
Pre-release

CHANGES

  • Improvement of redirectToDefaultLang in static mode: render home before Router.replace #82
  • Update yarn.lock for security reasons #85
  • Add Link, Router and clientSiteLang to API #84

0.11.0-canary.2

13 Mar 20:45
b6014df
Compare
Choose a tag to compare
0.11.0-canary.2 Pre-release
Pre-release

PATCHES

  • Fix issues about static mode redirectToLang=true #80

0.11.0-canary.1

13 Mar 19:12
Compare
Choose a tag to compare
0.11.0-canary.1 Pre-release
Pre-release

CHANGES

  • Support redirectToDefaultLang in static mode #79

0.10.6

12 Mar 12:32
4abec9d
Compare
Choose a tag to compare

PATCHES

  • Export all from page exports #75