GithubHelp home page GithubHelp logo

Comments (8)

ilanbm avatar ilanbm commented on September 4, 2024 5

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.

amannn avatar amannn commented on September 4, 2024 1

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.

amannn avatar amannn commented on September 4, 2024

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.

jamuhl avatar jamuhl commented on September 4, 2024

@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.

amannn avatar amannn commented on September 4, 2024

@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.

jamuhl avatar jamuhl commented on September 4, 2024

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.

amannn avatar amannn commented on September 4, 2024

Ah ok, I see! Good to hear! 🙌

from next-intl.

amannn avatar amannn commented on September 4, 2024

I'll close this issue, since other message formats are currently not planned.

from next-intl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.