React-i18next: Replace the with-react-i18next sample on zeit/next.js with a readme pointing to the sample here

Created on 28 Nov 2018  路  18Comments  路  Source: i18next/react-i18next

Most helpful comment

After some further thought, I do think it's best to get rid of the example. We've had a lot of problems with users not understanding it and asking the same questions over and over. In general, it's tricky to implement, and changing (pretty much) anything inside the example is going to break the whole process unless you are careful.

On the other hand, next-i18next has the potential to be a lot more robust, as we're abstracting all logic away from the user, thus not permitting them to break things.

Basically, I think the value added to the small subset of users who would actually benefit from learning from the example is outweighed by the mass confusion it has been causing for less experienced/aware users.

@jamuhl Thoughts? I'm sure it will make your life easier...

All 18 comments

@isaachinman that's with-i18next (was not of me) -> not the with-react-i18next (i contributed there)

https://github.com/zeit/next.js/tree/canary/examples/with-i18next
https://github.com/zeit/next.js/tree/canary/examples/with-react-i18next

Oh, sorry I did not realise. What is the difference between the two? Why do both exist?

with-i18next existed before the with-react-i18next (not sure why - but guess would not work really well anyway 馃榿) --- so not sure but for sure the with-react-i18next should get replaced with the readme too

We probably want to have just one single i18next example there to prevent confusion. Do you prefer the with-i18next or with-react-i18next naming? It's a Next repo, so React goes without saying...

with-react-i18next i guess - or with next-i18next??!

next-i18next i would say - as i would suggest in future we replace the nextjs sample here with a link to your repo

next-i18next should be the way to go from as soon as ready

Okay. Do you want to submit that PR? Just need to explain to @timneutkens your reasoning.

Can do so...removing the two existing ones and adding with-next-i18next

Yes, sounds good.

@isaachinman should we replace the sample here with a link to next-i18next too? guess based on https://github.com/i18next/react-i18next/issues/626#issuecomment-442518269 even having an issue it feels like the better solution to build on for new coming devs?!?

Not sure... for example @MathiasKandelborg mentioned that they prefer to have the code in their own source.

While the approach between the example in this repo and next-i18next is basically the same, the structure is much different, as the i18n instance is kept on a class, and we need to create HOCs instead of writing an _app.js directly, etc. Basically, it's a lot harder to understand what's going on when you look at the source of next-i18next as opposed to looking at the example here.

It will be a major pain to maintain both simultaneously, though...

let us sleep over it -> for sure maintenance and issue tracking would be easier with one solution than two

I might be a quite lonesome case I might add. I'm the type of person who writes his own array functions instead of using lodash, without even thinking about using it/finding a pre-made function.

But... I'd also like to add that I'd use anything that makes my life easier, but if I'm gonna make a custom solution anyways when implementing MUI, Stripe and 3 other technologies - I'd rather stick to having the source myself, so I don't have to make large changes to app architecture later on. So as long as there's the possibility of extending with ease, I'll jump right into it and deal with the few edge-cases down the road.

I don't think there's a definite solution but most of the time everything points to make it as easy as possible for everyone. That seems to be the right solution most of the time (at least the most used one).

Thanks for reading this quite redundant message, I just thought I'd chime in. Have a nice day! :smiley:

After some further thought, I do think it's best to get rid of the example. We've had a lot of problems with users not understanding it and asking the same questions over and over. In general, it's tricky to implement, and changing (pretty much) anything inside the example is going to break the whole process unless you are careful.

On the other hand, next-i18next has the potential to be a lot more robust, as we're abstracting all logic away from the user, thus not permitting them to break things.

Basically, I think the value added to the small subset of users who would actually benefit from learning from the example is outweighed by the mass confusion it has been causing for less experienced/aware users.

@jamuhl Thoughts? I'm sure it will make your life easier...

@isaachinman agree and glad you see it like me. If you like you can replace it with a readme pointing to next-i18next or i will do it later today.

630

Was this page helpful?
0 / 5 - 0 ratings