All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
5.0.3 (2024-03-06)
Note: Version bump only for package root
Note: Version bump only for package root
Note: Version bump only for package root
-
Accept empty messages (0a10ee6)
-
Adapt TypeScript validation to work with messages files that only have a single top-level namespace (#115) (cf0b83e)
-
Add back the ability to render the provider without messages (#113) (8395822)
-
Add error reporting when no
timeZone
is specified and downgrade error handling for missingnow
value from throwing to reporting an error (#519) (dc55ab2) -
Adjust default for
onError
of the provider to log errors correctly (#46) (d0a1986) -
Allow to call
getRequestConfig
in outer module closure in a Client Component module graph (#687) (0f16f10), closes #685 -
Allow to import
next-intl/link
into Server Components without having to add a wrapping Client Component (#465) (21a0691) -
Allow to import
next-intl/server
into Client Components (however not call any functions). This allows for easier testing of page components with multiple exports. (#683) (5ca4075), closes #681 -
Allow usage of
getTranslations({namespace})
without TypeScript integration for messages (#630) (62cf29c), closes #625 -
Allow usage of
next-intl/link
andusePathname
outside of Next.js (#338) (6e1a56c), closes #337 -
Allow usage outside of Next.js (e.g. Jest and Storybook) (#76) (7c6925b)
-
Apply correct port and protocol during domain-based redirects when called from an internal address (e.g. from a proxy) (#662) (2bb867d), closes #658
-
Apply global
timeZone
when using date skeletons in messages (e.g.Ordered on {orderDate, date, ::yyyyMd}
) (#695) (8940192), closes #693 -
Apply interval correctly in
useNow({updateInterval: …})
(#26) (119dee8) -
Apply time zone for built-in default formats (
full
,long
,medium
,short
) (#473) (244b9b2), closes #467 -
Automate versioning (internal change, publishing only for testing purposes) (#30) (5888855)
-
Bump lerna version (c2fb2ba)
-
Change
numeric
option fromauto
toalways
forformat.relativeTime
(#765) (246d373), closes #757 -
Clean up context errors (97804dc)
-
Clearer error message when no messages are provided (#66) (742729a)
-
Correct version range (ffbff8e)
-
Correctly normalize pathname for redirects and alternate links when
localePrefix: 'as-needed'
is used with the default locale (#698 by @anna-colenso) (48e9523) -
Don't require
react-dom
as a peer dependency (#39) (39edfcd) -
Don't retrieve defaults for
locale
,now
andtimeZone
if these options have been provided toNextIntlClientProvider
(#633) (824363a), closes #631 -
Don't set cookie on response if
localeDetection: false
(#654) (e85149c), closes #609 -
Fix compatibility with
moduleResolution: 'Bundler'
(#694) (f7425a5), closes #690 -
Fix forwarding of request headers in middleware (#269 by @ARochniak) (4ecbab5), closes #266
-
Fix support for older Next.js versions by moving
Link
tonext-intl/link
(#288) (f26ef99), closes #287 -
Fix types for passing a custom
type
toredirect
(#714) (db65cb7), closes #709 -
Forward optional remaining args from Next.js router to wrapped
useRouter
(3ff878c) -
Handle case where the
locale
param is an array and set cookie expiration to one year (#435) (82e842c) -
Improve API for rendering raw messages and add docs (#51) (19f4a7e)
-
Improve error message for missing messages by including the locale (#782) (79eee9d)
-
Improve error message when encountering a missing message in production (#706) (515891b)
-
Improve error message when trying to render an array as a message (#244) (c6a4f7a)
-
Improve error message when trying to use
next-intl
APIs in RSC (#267) (0f46176) -
Improve performance when calling hooks like
useTranslations
in Server Components by making sure we only suspend when i18n config is initially loaded and never for subsequent calls (#741) (4185a72) -
Improve RSC render performance by sharing a cache between
getTranslations
anduseTranslations
(#798 by @fkapsahili) (73e8337) -
Improve warning for invalid namespace characters (7435335)
-
Incorporate
basePath
correctly inuseRouter
functions (#906) (4abcbeb), closes #905 #910 -
Keep cookie value in sync when navigating within a locale (#828) (1167523), closes #826
-
Limit the function signature to return strings or React elements (#28) (c79b1f3)
-
Make sure cookie value stays up to date when the Next.js Router Cache is used (#790) (977b973), closes #786 #786
-
Move JSDoc for
next/link
(b85b6f5) -
Overwrite accidentially published pre-release (cb91e4c)
-
Overwrite prerelease (6caf5c4)
-
Prefer
locale
fromNextIntlClientProvider
when usinguseLocale
in Client Components.useParams().locale
is still used as a fallback. (#691) (e00ed97), closes #688 -
Remove
x-default
alternate links entry for non-root pathnames when usinglocalePrefix: 'always'
(#805) (c5bb0f5) -
Render correct messages when the namespace changes in
useTranslations
(#58) (b8f7dab) -
Return
now
from global context if noupdateInterval
has been set onuseNow
(#881) (dbbefcf) -
Return up-to-date translations when messages change (#199) (78f39b4)
-
Set
SameSite
attribute for locale cookie tostrict
(#302) (0a6bce5), closes #301 -
Set cookie to
SameSite: Lax
(#817) (0e91e64), closes #527 #811 -
Support identical wrappers with identical text content in rich text (#80) (b35bb9f)
-
Switch to
tsup
for more efficient bundling and also switch tovitest
internally (#375) (bf31626) -
Trigger 3.0 release on CI (5901439)
-
Update link to migration example in error messages (#648 by @outloudvi) (1f3b226)
-
Use
timeZone
in translation function fromuseTranslations
(#45) (ebf75f2) -
Use correct host and protocol for alternate links when running behind a proxy (
x-forwarded-host
,x-forwarded-proto
) (#462 by @HHongSeungWoo) (747cf8e) -
Use correct port for alternate links when running behind a proxy (#514 by @iza-w) (747ad5b)
-
Use correct version range for use-intl (02c33d3)
-
Use ESM build only for browser bundlers (not Node.js) (#386) (34a69f2)
-
feat!: Use a separate API for rich text formatting to avoid type casting in TypeScript #54 (4c13a64), closes #54
- Accept
locale
withuseRouter
APIs (#409) (0fbb3c7), closes #408 #407 #320 - Add
BigInt
support foruseFormatter.format()
by @tacomanator (#222) (a5ded6c) - Add
format.dateTimeRange
(#769 by @martinmunillas) (9f12521) - Add
format.list(…)
for formatting conjunctions and disjunctions (#327 by @stefanprobst) (32cda32) - Add
localePrefix: 'never'
option for middleware (#388 by @boris-arkenaar) (92ec33a), closes #366 - Add
localePrefix
for navigation APIs for an improved initial render ofLink
when usinglocalePrefix: never
. Also fix edge case in middleware when using localized pathnames for redirects that remove a locale prefix (fixes an infinite loop). (#678) (1c68e3b), closes #444 - Add
useFormatter
(replacesuseIntl
) (#209) (021b682) - Add
useLocale
anduseTimeZone
(#67) (7833f4a) - Add
useMessages
for convenience and restructure docs to be App Router-first (#345) (0dedbfd) - Add autocomplete support for
timeZone
(#359 by @A7med3bdulBaset) (630dfc2) - Add flag to return raw messages (#48) (b34e19f)
- Add navigation APIs for App Router (
useRouter
,usePathname
andLink
) (#282) (e30a89b) - Add redirects for case mismatches in locale prefixes (e.g.
/EN
→/en
) (#861) (3b2b446) - Add support for
basePath
in middleware and navigation APIs (#699 by @Robjam and @amannn) (f670f1b) - Add support for
permanentRedirect
in navigation APIs (#850 by @polvallverdu) (6508ddc) - Add support for customising time zones (#21) (42154f2)
- Add support for using
next-intl
in theapp
folder with Next.js 13 (see https://next-intl-docs.vercel.app/docs/next-13, #144) (18c94d6) - Default translation values (#86) (0ed5e70)
- Exact types for DateTimeFormatOptions (#23) (44aeb7c)
- Experimental support for
--turbo
(requiresnext@^14.0.3
) (#641) (46c6ec7), closes #250 - Extract
useIntl
. (ab8f9e0) - Global formatters (#14) (ffe9957)
- Improve runtime performance of
useTranslations
by avoiding the creation of message format instances if possible and introducing a cross-component message format cache (#475) (4d177f8), closes #294 - Invoke
notFound()
when no locale was attached to the request and update docs to suggest validating the locale ini18n.ts
(#742) (e6d9878), closes #736 #716 /next-intl-docs.vercel.app/docs/usage/configuration#i18 - Make options for
createSharedPathnamesNavigation
along withlocales
argument optional (relevant whenlocales
aren't known statically) (#784) (614053d) - Next.js 13 compatibility (#140) (65326a0), closes #139
- Provide
createTranslator
andcreateIntl
by extracting a React-agnostic core library. Thanks to David Brands from Marvia for sponsoring the work on this feature, participating in discussion and providing feedback! (#137) (91f7489) - Support custom units in
format.relativeTime
(#566) (6e1bc35) - support extending the request headers while creating the middleware. (91ff324)
- Support formatting of React elements via
format.list(…)
. (#845) (7bf11d4) - Support Next.js 11 (#36) (fc59871)
- Support Next.js 12 (#61) (0391cc8)
- Support Next.js 14 (#593) (5c449f5)
- Support React 18 (#98) (38614eb)
- Sync improvements from RSC branch to main (#238) (1d12ba2), closes #149 #237
- Type safe messages (#93) (13b49b1)
- TypeScript improvements: Use enum type for
style
ofNumberFormatOptions
, only allow passing React children to messages rendered witht.rich
and updatetslib
(#63) (d73e935) - Warn for invalid namespace keys (#106) (e86ab28)
- Revert "Improve README" (1c4f0a1)
- Instead of using the
t
function for formatting both regular messages and rich text, this function will only work for regular messages now. For rich text you can uset.rich
instead now.
-
Accept empty messages (0a10ee6)
-
Adapt TypeScript validation to work with messages files that only have a single top-level namespace (#115) (cf0b83e)
-
Add back the ability to render the provider without messages (#113) (8395822)
-
Add error reporting when no
timeZone
is specified and downgrade error handling for missingnow
value from throwing to reporting an error (#519) (dc55ab2) -
Adjust default for
onError
of the provider to log errors correctly (#46) (d0a1986) -
Allow to call
getRequestConfig
in outer module closure in a Client Component module graph (#687) (0f16f10), closes #685 -
Allow to import
next-intl/link
into Server Components without having to add a wrapping Client Component (#465) (21a0691) -
Allow to import
next-intl/server
into Client Components (however not call any functions). This allows for easier testing of page components with multiple exports. (#683) (5ca4075), closes #681 -
Allow usage of
getTranslations({namespace})
without TypeScript integration for messages (#630) (62cf29c), closes #625 -
Allow usage of
next-intl/link
andusePathname
outside of Next.js (#338) (6e1a56c), closes #337 -
Allow usage outside of Next.js (e.g. Jest and Storybook) (#76) (7c6925b)
-
Apply correct port and protocol during domain-based redirects when called from an internal address (e.g. from a proxy) (#662) (2bb867d), closes #658
-
Apply global
timeZone
when using date skeletons in messages (e.g.Ordered on {orderDate, date, ::yyyyMd}
) (#695) (8940192), closes #693 -
Apply interval correctly in
useNow({updateInterval: …})
(#26) (119dee8) -
Apply time zone for built-in default formats (
full
,long
,medium
,short
) (#473) (244b9b2), closes #467 -
Automate versioning (internal change, publishing only for testing purposes) (#30) (5888855)
-
Bump lerna version (c2fb2ba)
-
Change
numeric
option fromauto
toalways
forformat.relativeTime
(#765) (246d373), closes #757 -
Clean up context errors (97804dc)
-
Clearer error message when no messages are provided (#66) (742729a)
-
Correct version range (ffbff8e)
-
Correctly normalize pathname for redirects and alternate links when
localePrefix: 'as-needed'
is used with the default locale (#698 by @anna-colenso) (48e9523) -
Don't require
react-dom
as a peer dependency (#39) (39edfcd) -
Don't retrieve defaults for
locale
,now
andtimeZone
if these options have been provided toNextIntlClientProvider
(#633) (824363a), closes #631 -
Don't set cookie on response if
localeDetection: false
(#654) (e85149c), closes #609 -
Fix compatibility with
moduleResolution: 'Bundler'
(#694) (f7425a5), closes #690 -
Fix forwarding of request headers in middleware (#269 by @ARochniak) (4ecbab5), closes #266
-
Fix support for older Next.js versions by moving
Link
tonext-intl/link
(#288) (f26ef99), closes #287 -
Fix types for passing a custom
type
toredirect
(#714) (db65cb7), closes #709 -
Forward optional remaining args from Next.js router to wrapped
useRouter
(3ff878c) -
Handle case where the
locale
param is an array and set cookie expiration to one year (#435) (82e842c) -
Improve API for rendering raw messages and add docs (#51) (19f4a7e)
-
Improve error message for missing messages by including the locale (#782) (79eee9d)
-
Improve error message when encountering a missing message in production (#706) (515891b)
-
Improve error message when trying to render an array as a message (#244) (c6a4f7a)
-
Improve error message when trying to use
next-intl
APIs in RSC (#267) (0f46176) -
Improve performance when calling hooks like
useTranslations
in Server Components by making sure we only suspend when i18n config is initially loaded and never for subsequent calls (#741) (4185a72) -
Improve RSC render performance by sharing a cache between
getTranslations
anduseTranslations
(#798 by @fkapsahili) (73e8337) -
Improve warning for invalid namespace characters (7435335)
-
Incorporate
basePath
correctly inuseRouter
functions (#906) (4abcbeb), closes #905 #910 -
Keep cookie value in sync when navigating within a locale (#828) (1167523), closes #826
-
Limit the function signature to return strings or React elements (#28) (c79b1f3)
-
Make sure cookie value stays up to date when the Next.js Router Cache is used (#790) (977b973), closes #786 #786
-
Move JSDoc for
next/link
(b85b6f5) -
Overwrite accidentially published pre-release (cb91e4c)
-
Overwrite prerelease (6caf5c4)
-
Prefer
locale
fromNextIntlClientProvider
when usinguseLocale
in Client Components.useParams().locale
is still used as a fallback. (#691) (e00ed97), closes #688 -
Remove
x-default
alternate links entry for non-root pathnames when usinglocalePrefix: 'always'
(#805) (c5bb0f5) -
Render correct messages when the namespace changes in
useTranslations
(#58) (b8f7dab) -
Return
now
from global context if noupdateInterval
has been set onuseNow
(#881) (dbbefcf) -
Return up-to-date translations when messages change (#199) (78f39b4)
-
Set
SameSite
attribute for locale cookie tostrict
(#302) (0a6bce5), closes #301 -
Set cookie to
SameSite: Lax
(#817) (0e91e64), closes #527 #811 -
Support identical wrappers with identical text content in rich text (#80) (b35bb9f)
-
Switch to
tsup
for more efficient bundling and also switch tovitest
internally (#375) (bf31626) -
Trigger 3.0 release on CI (5901439)
-
Update link to migration example in error messages (#648 by @outloudvi) (1f3b226)
-
Use
timeZone
in translation function fromuseTranslations
(#45) (ebf75f2) -
Use correct host and protocol for alternate links when running behind a proxy (
x-forwarded-host
,x-forwarded-proto
) (#462 by @HHongSeungWoo) (747cf8e) -
Use correct port for alternate links when running behind a proxy (#514 by @iza-w) (747ad5b)
-
Use correct version range for use-intl (02c33d3)
-
Use ESM build only for browser bundlers (not Node.js) (#386) (34a69f2)
-
feat!: Use a separate API for rich text formatting to avoid type casting in TypeScript #54 (4c13a64), closes #54
- Accept
locale
withuseRouter
APIs (#409) (0fbb3c7), closes #408 #407 #320 - Add
BigInt
support foruseFormatter.format()
by @tacomanator (#222) (a5ded6c) - Add
format.dateTimeRange
(#769 by @martinmunillas) (9f12521) - Add
format.list(…)
for formatting conjunctions and disjunctions (#327 by @stefanprobst) (32cda32) - Add
localePrefix: 'never'
option for middleware (#388 by @boris-arkenaar) (92ec33a), closes #366 - Add
localePrefix
for navigation APIs for an improved initial render ofLink
when usinglocalePrefix: never
. Also fix edge case in middleware when using localized pathnames for redirects that remove a locale prefix (fixes an infinite loop). (#678) (1c68e3b), closes #444 - Add
useFormatter
(replacesuseIntl
) (#209) (021b682) - Add
useLocale
anduseTimeZone
(#67) (7833f4a) - Add
useMessages
for convenience and restructure docs to be App Router-first (#345) (0dedbfd) - Add autocomplete support for
timeZone
(#359 by @A7med3bdulBaset) (630dfc2) - Add flag to return raw messages (#48) (b34e19f)
- Add navigation APIs for App Router (
useRouter
,usePathname
andLink
) (#282) (e30a89b) - Add redirects for case mismatches in locale prefixes (e.g.
/EN
→/en
) (#861) (3b2b446) - Add support for
basePath
in middleware and navigation APIs (#699 by @Robjam and @amannn) (f670f1b) - Add support for
permanentRedirect
in navigation APIs (#850 by @polvallverdu) (6508ddc) - Add support for customising time zones (#21) (42154f2)
- Add support for using
next-intl
in theapp
folder with Next.js 13 (see https://next-intl-docs.vercel.app/docs/next-13, #144) (18c94d6) - Default translation values (#86) (0ed5e70)
- Exact types for DateTimeFormatOptions (#23) (44aeb7c)
- Experimental support for
--turbo
(requiresnext@^14.0.3
) (#641) (46c6ec7), closes #250 - Extract
useIntl
. (ab8f9e0) - Global formatters (#14) (ffe9957)
- Improve runtime performance of
useTranslations
by avoiding the creation of message format instances if possible and introducing a cross-component message format cache (#475) (4d177f8), closes #294 - Invoke
notFound()
when no locale was attached to the request and update docs to suggest validating the locale ini18n.ts
(#742) (e6d9878), closes #736 #716 /next-intl-docs.vercel.app/docs/usage/configuration#i18 - Make options for
createSharedPathnamesNavigation
along withlocales
argument optional (relevant whenlocales
aren't known statically) (#784) (614053d) - Next.js 13 compatibility (#140) (65326a0), closes #139
- Provide
createTranslator
andcreateIntl
by extracting a React-agnostic core library. Thanks to David Brands from Marvia for sponsoring the work on this feature, participating in discussion and providing feedback! (#137) (91f7489) - Support custom units in
format.relativeTime
(#566) (6e1bc35) - support extending the request headers while creating the middleware. (91ff324)
- Support formatting of React elements via
format.list(…)
. (#845) (7bf11d4) - Support Next.js 11 (#36) (fc59871)
- Support Next.js 12 (#61) (0391cc8)
- Support Next.js 14 (#593) (5c449f5)
- Support React 18 (#98) (38614eb)
- Sync improvements from RSC branch to main (#238) (1d12ba2), closes #149 #237
- Type safe messages (#93) (13b49b1)
- TypeScript improvements: Use enum type for
style
ofNumberFormatOptions
, only allow passing React children to messages rendered witht.rich
and updatetslib
(#63) (d73e935) - Warn for invalid namespace keys (#106) (e86ab28)
- Revert "Improve README" (1c4f0a1)
- Instead of using the
t
function for formatting both regular messages and rich text, this function will only work for regular messages now. For rich text you can uset.rich
instead now.
- Incorporate
basePath
correctly inuseRouter
functions (#906 by @Oberwaditzer) (4abcbeb), closes #905 #910
- Add redirects for case mismatches in locale prefixes (e.g.
/EN
→/en
) (#861 by @fkapsahili) (3b2b446)
- Add
format.dateTimeRange
(#769 by @martinmunillas) (9f12521)
- Add support for
permanentRedirect
in navigation APIs (#850 by @polvallverdu) (6508ddc)
- Improve RSC render performance by sharing a cache between
getTranslations
anduseTranslations
(#798 by @fkapsahili) (73e8337)
- Remove
x-default
alternate links entry for non-root pathnames when usinglocalePrefix: 'always'
(#805) (c5bb0f5)
- Make options for
createSharedPathnamesNavigation
along withlocales
argument optional (relevant whenlocales
aren't known statically) (#784) (614053d)
- Make sure cookie value stays up to date when the Next.js Router Cache is used (#790) (977b973), closes #786 #786
- Apply global
timeZone
when using date skeletons in messages (e.g.Ordered on {orderDate, date, ::yyyyMd}
) (#695) (8940192), closes #693
- Invoke
notFound()
when no locale was attached to the request and update docs to suggest validating the locale ini18n.ts
(#742) (e6d9878), closes #736 #716 /next-intl-docs.vercel.app/docs/usage/configuration#i18
- Improve performance when calling hooks like
useTranslations
in Server Components by making sure we only suspend when i18n config is initially loaded and never for subsequent calls (#741) (4185a72)
- Correctly normalize pathname for redirects and alternate links when
localePrefix: 'as-needed'
is used with the default locale (#698 by @anna-colenso) (48e9523)
- Prefer
locale
fromNextIntlClientProvider
when usinguseLocale
in Client Components.useParams().locale
is still used as a fallback. (#691) (e00ed97), closes #688
- Allow to call
getRequestConfig
in outer module closure in a Client Component module graph (#687) (0f16f10), closes #685
- Allow to import
next-intl/server
into Client Components (however not call any functions). This allows for easier testing of page components with multiple exports. (#683) (5ca4075), closes #681
- Add
localePrefix
for navigation APIs for an improved initial render ofLink
when usinglocalePrefix: never
. Also fix edge case in middleware when using localized pathnames for redirects that remove a locale prefix (fixes an infinite loop). (#678) (1c68e3b), closes #444
- Apply correct port and protocol during domain-based redirects when called from an internal address (e.g. from a proxy) (#662) (2bb867d), closes #658
- Update link to migration example in error messages (#648 by @outloudvi) (1f3b226)
Note: Version bump only for package root
- Don't retrieve defaults for
locale
,now
andtimeZone
if these options have been provided toNextIntlClientProvider
(#633) (824363a), closes #631
- Allow usage of
getTranslations({namespace})
without TypeScript integration for messages (#630) (62cf29c), closes #625
Add provenance statement to published packages.
Please refer to the release notes.
- Correct version range (ffbff8e)
- Add error reporting when no
timeZone
is specified and downgrade error handling for missingnow
value from throwing to reporting an error (#519) (dc55ab2)
- Improve runtime performance of
useTranslations
by avoiding the creation of message format instances if possible and introducing a cross-component message format cache (#475) (4d177f8), closes #294
- Allow to import
next-intl/link
into Server Components without having to add a wrapping Client Component (#465) (21a0691)
- Apply time zone for built-in default formats (
full
,long
,medium
,short
) (#473) (244b9b2), closes #467
- Use correct host and protocol for alternate links when running behind a proxy (
x-forwarded-host
,x-forwarded-proto
) (#462 by @HHongSeungWoo) (747cf8e)
- Handle case where the
locale
param is an array and set cookie expiration to one year (#435) (82e842c)
- Add
localePrefix: 'never'
option for middleware (#388 by @boris-arkenaar) (92ec33a), closes #366
- Forward optional remaining args from Next.js router to wrapped
useRouter
(3ff878c)
- Add
format.list(…)
for formatting conjunctions and disjunctions (#327 by @stefanprobst) (32cda32)
Note: Version bump only for package root
2.14.4 (2023-05-22)
- Move JSDoc for
next/link
(b85b6f5)
- Fix support for older Next.js versions by moving
Link
tonext-intl/link
(#288) (f26ef99), closes #287
Note: Version bump only for package root
Note: Version bump only for package root
- Improve warning for invalid namespace characters (7435335)
- Add
BigInt
support foruseFormatter.format()
by @tacomanator (#222) (a5ded6c)
Note: Version bump only for package root
Note: Version bump only for package root
- Add support for using
next-intl
in theapp
folder with Next.js 13 (see https://next-intl-docs.vercel.app/docs/next-13, #144) (18c94d6)
Note: Version bump only for package root
Note: Version bump only for package root
- Provide
createTranslator
andcreateIntl
by extracting a React-agnostic core library. Thanks to David Brands from Marvia for sponsoring the work on this feature, participating in discussion and providing feedback! (#137) (91f7489)
Note: Version bump only for package root
Note: Version bump only for package root
- Adapt TypeScript validation to work with messages files that only have a single top-level namespace (#115) (cf0b83e)
- Overwrite prerelease (6caf5c4)
2.4.0 (2022-02-08)
Note: Version bump only for package root
Note: Version bump only for package root
Note: Version bump only for package root
- TypeScript improvements: Use enum type for
style
ofNumberFormatOptions
, only allow passing React children to messages rendered witht.rich
and updatetslib
(#63) (d73e935)
Note: Version bump only for package root
Note: Version bump only for package root
Note: Version bump only for package root
Note: Version bump only for package root
Note: Version bump only for package root
- feat!: Use a separate API for rich text formatting to avoid type casting in TypeScript #54 (4c13a64), closes #54
- Instead of using the
t
function for formatting both regular messages and rich text, this function will only work for regular messages now. For rich text you can uset.rich
instead now.
Note: Version bump only for package root
Note: Version bump only for package root
Note: Version bump only for package root
1.4.2 (2021-06-16)
1.4.1 (2021-06-16)
- Use correct version range for use-intl (02c33d3)
1.4.0 (2021-06-16)
Note: Version bump only for package root
Note: Version bump only for package root
Note: Version bump only for package root
Note: Version bump only for package root
Note: Version bump only for package root
Note: Version bump only for package root
Note: Version bump only for package root
Note: Version bump only for package root
1.3.3 (2021-02-09)
- Fix: Limit the function signature to return strings or React elements
- Fix: Apply interval correctly in
useNow({updateInterval: …})
- Feat: Add a global fallback for the
now
parameter offormatRelativeTime
. - Feat: Add
useNow
hook, which can be used in conjunction withformatRelativeTime
to continuously update the result. - Fix: Allow
messages
to be optional on the provider.
- Feat: Added specific types for
DateTimeFormatOptions
.
- Feat: Added support for handling time zones.
- Fix: Use 1.0 version of
use-intl
.
This library is now considered production ready. There are no changes from the previous version.
- Feature: Add global formats (see docs)
- Fix: Export
IntlErrorCode
for JavaScript users.
- Fix: Return a stable function reference for
t
.
- Feature: Add error handling capabilities (see docs)
- Chore: Depend on
use-intl
- BREAKING CHANGE: Rename
NextIntlMessages
toIntlMessages
(TypeScript only)
- Fix: Don't throw for empty messages (
""
).