Comments (8)
It makes sense I guessed there is more to it in the plurals area, I've never used it...
For my usage the transformation was quick and simple.
I wonder if there are already migration scripts between them and other formats.
Thanks for the response, I'll keep an eye here also
from next-intl.
There's Intl.MessageFormat
on the horizon which uses the Message Format 2 syntax. It's still under heavy development, but if this makes it into the browsers that is probably a format we should support since it will decrease the library size significantly if we don't have to bundle a parser.
from next-intl.
Thanks for opening this!
I have a bit of experience with i18next but from what I saw so far it is similar in things like interpolation, but differs quite a bit with more sophisticated features. E.g. for plurals and select you have to use different messages that are then embedded within the original message. With ICU there's just one message, which is a large factor why I prefer that syntax.
I'm not sure if there's support for selectordinal
in i18next
and rich text would require a different API at the call site (array instead of object, or alternatively indices as keys).
This library is quite integrated with the ICU functionalities at this point. To support a different syntax, forking the library might be the easier choice.
However what I think could be interesting is a migration guide from i18next to ICU / this lib, possibly with automated tools helping in the process.
I don't have any plans yet to support other localisation syntax, but I'll leave this open to see if there's more interest.
(and my motivation to not use i18next on a nextjs project was a heavy performance hit on client side, including having all languages locales sent to browser)
Glad to hear if this lib helps with this!
from next-intl.
@ilanbm and others stumbling onto this. i18next is built to only load what is needed (separation of languages, namespaces) - running into performance issues where the clientside loads all languages and namespaces is basically a result of not using it right -> using next-i18next (or at least following how to do it right) will help: https://github.com/i18next/next-i18next
from next-intl.
@jamuhl I'm sorry, I can't follow how that is related to this issue? Also please note that next-intl
is not affiliated with i18next.
from next-intl.
it's related to
(and my motivation to not use i18next on a nextjs project was a heavy performance hit on client side, including having all languages locales sent to browser)
just wanted to make clear that i18next does not have that problems mentioned (for others coming here)
from next-intl.
Ah ok, I see! Good to hear! 🙌
from next-intl.
I'll close this issue, since other message formats are currently not planned.
from next-intl.
Related Issues (20)
- Pathnames with 2 dynamics values of the same name require 2 different params HOT 1
- Example-app-router error when using output: 'export' (SSG) HOT 1
- Unable to find `next-intl` locale because the middleware didn't run on this request. HOT 1
- next-intl does not output index.html file HOT 1
- router issue when switching locale: path.startsWith is not a function HOT 8
- Incompatibility of Server-Side Functions with Client Component Layout in Next.js 14 /app HOT 1
- How to send the language (locale) code to Fetch operations processed by the Client Side? HOT 1
- Unable to Use loading.tsx with next-intl in App Router with i18n Routing HOT 4
- NextJS 15 support HOT 2
- Cannot retrieve Link's props from createLocalizedPathnamesNavigation HOT 1
- Middleware should gracefully handle unsupported but valid locale identifiers HOT 1
- Next.js - Navigation between pages in the pages router loses translations. HOT 3
- [Docs]: Typescript Validation HOT 1
- NextJS 15's `next/font` breaks alternate header injection. HOT 3
- Add Support for Setting HttpOnly and Secure Flags on NEXT_LOCALE Cookie HOT 4
- Localized search/query params HOT 1
- Using Link component with legacyBehavior+passHref producing warnings HOT 3
- getPathname with params HOT 6
- During build process static path are not translated to its reflection from pathnames mapping from config.ts file HOT 1
- Export Href type definition that works for getPathname, redirect & <Link /> params/props HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next-intl.