0.4.0
Breaking changes
This release contains several breaking changes, as we move closer to a v1:
createI18n<typeof Locale>()
doesn't require anymore a generic, you should now havecreateI18n()
useI18n
hook now only returns at
function, instead of an object containing botht
andscopedT
functions- A new
useScopedI18n
hook replaces the oldscopedT
function, and works similarly
And some new features:
- A new
useCurrentLocale
hook that is correctly typed and returns the current locale - Improved types for params extraction of the translations
The README has been updated to reflect those changes. Huge thanks to @baptisteArno and @mieszkosabo for landing these improvements!
What's Changed
- feat(international-types): improve plural extraction by @QuiiBz in #45
- fix(international-types): allow multiple params in plural by @QuiiBz in #46
- feat: add use scoped i18n hook by @baptisteArno in #48
- fix: use
workspace:*
protocol by @QuiiBz in #49 - feat: better type-safety for locales by @mieszkosabo in #52
New Contributors
- @baptisteArno made their first contribution in #48
- @mieszkosabo made their first contribution in #52
Full Changelog: 0.3.6...0.4.0