next-translate

Next.js plugin + i18n API for Next.js 🌍 - Load page translations and use them in an easy way!

MIT License

Downloads
311.8K
Stars
2.5K
Committers
70

Bot releases are hidden (Show)

next-translate - 0.13.0-canary.3

Published by aralroca over 4 years ago

CHANGES

  • Add lang into getInitialProps #97
  • Update logo + docs #96
next-translate - 0.13.0-canary.2

Published by aralroca over 4 years ago

PATCHES

  • Fix specialMethod detection #95
next-translate - 0.13.0-canary.1

Published by aralroca over 4 years ago

CHANGES

  • Inject lang into getStaticProps, getStaticPaths and getServerSideProps #93
next-translate - 0.12.0

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

CHANGES

  • Allow disable lang on Link #89
  • Update deps #90
next-translate - 0.11.1

Published by aralroca over 4 years ago

PATCHES

  • Fix error when Router options is undefined #86
next-translate - 0.11.0

Published by aralroca over 4 years ago

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
next-translate - 0.11.0-canary.3

Published by aralroca over 4 years ago

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
next-translate - 0.11.0-canary.2

Published by aralroca over 4 years ago

PATCHES

  • Fix issues about static mode redirectToLang=true #80
next-translate - 0.11.0-canary.1

Published by aralroca over 4 years ago

CHANGES

next-translate - 0.10.6

Published by aralroca over 4 years ago

PATCHES

next-translate - 0.10.5

Published by aralroca over 4 years ago

next-translate - 0.10.4

Published by aralroca over 4 years ago

PATCHES

next-translate - 0.10.3

Published by aralroca over 4 years ago

PATCHES

next-translate - 0.10.2

Published by aralroca over 4 years ago

PATCHES

next-translate - 0.10.1

Published by aralroca over 4 years ago

Changes

next-translate - 0.10.0

Published by aralroca over 4 years ago

Changes

next-translate - 0.10.0-canary.1

Published by aralroca over 4 years ago

Changes

Note: Requires next version >= 9.2.3

next-translate - 0.9.0

Published by aralroca over 4 years ago

Changes

next-translate - 0.8.0

Published by aralroca over 4 years ago

Changes

next-translate - 0.7.0

Published by aralroca over 4 years ago

Changes