next-multilingual
Advanced tools
Changelog
3.0.0 (2022-10-27)
defaultLocale
parameter (it used to be implicit).getHtmlLang
now takes a DocumentProps
object as an argument to better align with functional components.getLocalizedRouteParameters
takes new parameter: import.meta.url
<Link>
, useLocalizedUrl
, getLocalizedUrl
no longer allow UrlObject
to be passed in argument. Only strings are supported to simplify the API types. UrlObject.href
can easily be used instead of passing the object directly. - useRouter().query
is no longer used to pass dynamic route parameters. Full URLs should be provided instead.useLocalizedUrl
and getLocalizedUrl
have a new 3rd parameter: localizedRouteParameters
- meaning the existing parameters will shift by 1 position.slugify
's locale
argument is now mandatory.Changelog
2.0.0 (2022-09-18)
getLocalizedRouteParameters
arguments to take directly the getStaticProps
or getServerSideProps
contexts.useRouter
will now return the locales used by next-multilingual
instead of those used by Next.js:
getActualLocale
, getActualLocales
and getActualDefaultLocale
should not longer be requiredMultilingualStaticProps
by getStaticPropsLocales
MultilingualServerSideProps
by getServerSidePropsLocales