Giter VIP home page Giter VIP logo

Comments (8)

bim-oulabi avatar bim-oulabi commented on September 4, 2024

in addition to having support for detect language maybe?
and thank you for the awesome lib, so far everything else has been working flawlessly in server components + client components,
without having to drill props nor complicated setup

from next-international.

QuiiBz avatar QuiiBz commented on September 4, 2024

Thanks for the kind words! I'll take a look at this issue.

from next-international.

QuiiBz avatar QuiiBz commented on September 4, 2024

The default locale serves as a fallback if no locale matches the Accept-Language header. Your browser might be configured to use English as the default locale, so next-international tries as much as possible to use the user's locale.

from next-international.

bim-oulabi avatar bim-oulabi commented on September 4, 2024

Wouldn't make more since if we can pass an argument ( which I thought the second param in the middleware is for ) to force default language? if its none existing we can use accept-language in this case

from next-international.

QuiiBz avatar QuiiBz commented on September 4, 2024

I don't think it's a good idea to force a specific language if users specifically set their preferred language. This goes against what the user expects.

I'm curious about what the community thinks about this. Feel free to add reactions if you agree/disagree to see what we should do in the future.

from next-international.

bim-oulabi avatar bim-oulabi commented on September 4, 2024

Well this is exactly why its only for default because some systems may focus on having a specific default language.

in case the user preferred language isn't supported how would it behave though? would it choose the default passed as default locale?

from next-international.

QuiiBz avatar QuiiBz commented on September 4, 2024

in case the user preferred language isn't supported how would it behave though? would it choose the default passed as default locale?

Yes, if the preferred language isn't configured in your app, it will use configured one (2nd argument)

from next-international.

bim-oulabi avatar bim-oulabi commented on September 4, 2024

Perfect
Thank you ao much๐Ÿ™๐Ÿ™๐Ÿ™

from next-international.

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.