Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate NRN I18n routing implementation to native Next.js I18n #194

Open
Vadorequest opened this issue Nov 1, 2020 · 7 comments
Open

Migrate NRN I18n routing implementation to native Next.js I18n #194

Vadorequest opened this issue Nov 1, 2020 · 7 comments
Assignees
Labels
enhancement New feature or request on-hold Something is blocking or work as stopped for now

Comments

@Vadorequest
Copy link
Member

Vadorequest commented Nov 1, 2020

Goal

Update the current NRN implementation of I18n routing to the new official Next.js 10 I18n routing.

The update will provide more ways of configuring the i18n routing. Currently, NRN only handles the sub-path routing strategy. See https://nextjs.org/docs/advanced-features/i18n-routing#sub-path-routing

Status

Awaiting below issues to be fixed before starting working on this.

Issues

Currently, the Next.js i18n routing implementation doesn't generate a prefix url for the default locale.

This is a breaking changes for apps created through NRN. I'll await a fix for this before starting working on it.

To do

Reference

@Vadorequest Vadorequest added enhancement New feature or request on-hold Something is blocking or work as stopped for now labels Nov 1, 2020
@Vadorequest Vadorequest self-assigned this Nov 1, 2020
@Vadorequest Vadorequest mentioned this issue Nov 1, 2020
@7iomka
Copy link

7iomka commented Nov 3, 2020

Hi @Vadorequest
After upgrade to next 10x I get wrong lang attribute on html tag without any advanced changes in codebase.
This is because now next automatically resolve html lang attribute
So your code

<Html lang={lang}>

now not working at all.
I open page in locale 'ru' but get <html lang="en">
Why next turn on this feature without the user including himself i18n config?
I'm shocked.

@7iomka
Copy link

7iomka commented Nov 3, 2020

Hm..
Seems 10.0.1-canary.7 fixes this.
will need to test

@Vadorequest
Copy link
Member Author

Thanks for letting me know, I hadn't noticed this!

And yes, Next shouldn't enable this when you haven't opt-in for their i18n routing feature.
I'm glad you found a workaround. There are other bugs in the 10.0.0 release and the canary branch is a fine workaround for now. It'll probably be patched in the 10.0.1 like many other things.

@Vadorequest
Copy link
Member Author

FYI I won't change the current implementation until Next adds support for proper redirection to default locale prefix.

image

The default locale does not have a prefix.

The current behavior is a breaking change and cannot be configured at this time. Many people are asking for it but so far nothing.

@Vadorequest
Copy link
Member Author

This issue hasn't been addressed by Next.js yet, despite having more than 70 upvotes.

vercel/next.js#18419

I suggest you upvote the official Next.js discussion if you wish to see this happen.

@samuelcastro
Copy link
Contributor

Any new updates on this one?

@Vadorequest
Copy link
Member Author

Vadorequest commented Mar 2, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request on-hold Something is blocking or work as stopped for now
Projects
None yet
Development

No branches or pull requests

3 participants