next-international

Type-safe internationalization (i18n) for Next.js

MIT License

Downloads
134.2K
Stars
1.3K
Committers
23

Bot releases are hidden (Show)

next-international - 0.6.4

Published by QuiiBz about 1 year ago

What's Changed

Full Changelog: https://github.com/QuiiBz/next-international/compare/0.6.3...0.6.4

next-international - 0.6.3

Published by QuiiBz about 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/QuiiBz/next-international/compare/0.6.2...0.6.3

next-international - 0.6.2

Published by QuiiBz over 1 year ago

What's Changed

Full Changelog: https://github.com/QuiiBz/next-international/compare/0.6.1...0.6.2

next-international - 0.6.1

Published by QuiiBz over 1 year ago

What's Changed

Full Changelog: https://github.com/QuiiBz/next-international/compare/0.6.0...0.6.1

next-international - 0.6.0

Published by QuiiBz over 1 year ago

Nested objects locales

You can now write locales using nested objects instead of the default dot notation. You can use the syntax you prefer without updating anything else:

// locales/en.ts
export default {
  hello: 'Hello',
  hello: {
    world: 'Hello world!',
    nested: {
      translations: 'Translations'
    }
  }
} as const

It's the equivalent of the following:

export default {
  'hello': 'Hello',
  'hello.world': 'Hello world!',
  'hello.nested.translations': 'Translations'
} as const

What's Changed

Full Changelog: https://github.com/QuiiBz/next-international/compare/0.5.3...0.6.0

next-international - 0.5.3

Published by QuiiBz over 1 year ago

Fix the bundle that preserved JSX instead of transforming it with createElement calls

Full Changelog: https://github.com/QuiiBz/next-international/compare/0.5.2...0.5.3

next-international - 0.5.2

Published by QuiiBz over 1 year ago

Breaking change

I18nProviderServer has been removed because it is now useless. You can simply remove it from your layout, see the README for the updated documentation.

What's Changed

Full Changelog: https://github.com/QuiiBz/next-international/compare/0.5.1...0.5.2

next-international - 0.5.1

Published by QuiiBz over 1 year ago

What's Changed

Full Changelog: https://github.com/QuiiBz/next-international/compare/0.5.0...0.5.1

next-international - 0.5.0

Published by QuiiBz over 1 year ago

App Router initial support

This release implements initial support for the App Router of Next.js 13. These changes shouldn't impact existing applications using the library with the Pages Router.

See the documentation here

What's Changed

Full Changelog: https://github.com/QuiiBz/next-international/compare/0.4.1...0.5.0

next-international - 0.4.1

Published by QuiiBz over 1 year ago

What's Changed

Full Changelog: https://github.com/QuiiBz/next-international/compare/0.4.0...0.4.1

next-international - 0.4.0

Published by QuiiBz over 1 year ago

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 have createI18n()
  • useI18n hook now only returns a t function, instead of an object containing both t and scopedT functions
  • A new useScopedI18n hook replaces the old scopedT 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

New Contributors

Full Changelog: https://github.com/QuiiBz/next-international/compare/0.3.6...0.4.0

next-international - 0.3.6

Published by QuiiBz about 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/QuiiBz/next-international/compare/0.3.0...0.3.6

next-international - 0.3.0

Published by QuiiBz about 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/QuiiBz/next-international/compare/0.2.0...0.3.0

next-international - 0.2.0

Published by QuiiBz about 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/QuiiBz/next-international/compare/0.1.1...0.2.0

next-international - 0.1.1

Published by QuiiBz about 2 years ago

What's Changed

Full Changelog: https://github.com/QuiiBz/next-international/compare/0.1.0...0.1.1

next-international - 0.1.0

Published by QuiiBz about 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/QuiiBz/next-international/commits/0.1.0