Introduction to Next.js 10's Internationalized (i18n) Routing

  Рет қаралды 8,227

Leigh Halliday

Leigh Halliday

Күн бұрын

Пікірлер: 59
@AryanLokar
@AryanLokar 4 жыл бұрын
You are really clear and easy to understand, thank you
@leighhalliday
@leighhalliday 4 жыл бұрын
Thank you Aryan!! :)
@Badadodadoop
@Badadodadoop 4 жыл бұрын
Dude, your videos are awesome. Learning so much from them. Thank you!
@leighhalliday
@leighhalliday 4 жыл бұрын
Bless you! Glad you enjoy them!
@ferrad1
@ferrad1 4 жыл бұрын
I made This video request a few weeks ago on This channel wow Thank you for coming through Very helpful video!
@leighhalliday
@leighhalliday 4 жыл бұрын
I got you, fam!
@igor_cojocaru
@igor_cojocaru 4 жыл бұрын
Thank you Leigh! Very useful
@leighhalliday
@leighhalliday 4 жыл бұрын
You're very welcome, Igor!
@cience
@cience 4 жыл бұрын
I have been meaning to learn Next.js, thank you so much for this!
@leighhalliday
@leighhalliday 4 жыл бұрын
You're welcome! Next.js is pretty awesome, you won't regret it!
@Sindoku
@Sindoku 3 жыл бұрын
Thanks Leigh!!
@leighhalliday
@leighhalliday 3 жыл бұрын
Glad it helped!
@Sindoku
@Sindoku 3 жыл бұрын
@@leighhalliday Yessir, me too :). It was the first time I properly did i18n in an application.
@kunglane
@kunglane 4 жыл бұрын
Great Tutorial thanks! I already implemented React Intl for our hardcoded strings and it works just great👏
@leighhalliday
@leighhalliday 4 жыл бұрын
Thank you!! :) Glad you enjoyed it!
@kunglane
@kunglane 4 жыл бұрын
@@leighhalliday if I want to use variables inside of strings, how could I accomplish that with react-intl?
@denisaugsburger2693
@denisaugsburger2693 3 жыл бұрын
Thanks a lot for the tutorial! It's less painful to maintain if you extract the messages from your components and omit the ID (FormatJS CLI). Then you can translate the JSON file(s) directly with the Simpleen cli :) Even add a watcher to constantly keep them in sync
@leighhalliday
@leighhalliday 3 жыл бұрын
That's awesome, thanks for the tip Denis!
@abessesmahi4888
@abessesmahi4888 4 жыл бұрын
Awesome ! Thank you so much sir.
@leighhalliday
@leighhalliday 4 жыл бұрын
Thank you Abesse!!
@jaany
@jaany 4 жыл бұрын
Thanks for the great video!
@leighhalliday
@leighhalliday 4 жыл бұрын
Thank you Jan!!
@seanaguinaga
@seanaguinaga 3 жыл бұрын
What is showing what components are re-rendering?
@SakaryaRehberimcom
@SakaryaRehberimcom 3 жыл бұрын
Awesome
@yigitruzgaruzun7289
@yigitruzgaruzun7289 3 жыл бұрын
Incredibly beautiful man : Leigh Halliday
@leighhalliday
@leighhalliday 3 жыл бұрын
Haha these are the comments I can get behind :)
@maykelesser
@maykelesser 3 жыл бұрын
My locale is coming undefined from my console. What can i do?
@moeraad
@moeraad 3 жыл бұрын
how to store my local in localstorage if i'm setting it in _document.js ? since this page renders on the server !
@leighhalliday
@leighhalliday 3 жыл бұрын
Maybe do the same thing in your _app.js component
@mooder3247
@mooder3247 3 жыл бұрын
What if i wanted to grab the language data from api how i can achieve that ? Should i use getServersideprops on every page so when the user change the local it fetches the data in the language that he chose ? Or there is another way ?
@Sindoku
@Sindoku 3 жыл бұрын
How do you get rid of the "Missing message: "p" for locale "en", using id as fallback." message in the console?
@leighhalliday
@leighhalliday 3 жыл бұрын
I'm not sure off the top of my head... sorry!
@Sindoku
@Sindoku 3 жыл бұрын
@@leighhalliday all good, it was just a warning anyway
@Sindoku
@Sindoku 3 жыл бұрын
The actual code worked as intended which is what matters I suppose
@saimirkapaj255
@saimirkapaj255 4 жыл бұрын
Thanks for the video Leigh. FYI the i18n support is not compatible with the next export.
@leighhalliday
@leighhalliday 4 жыл бұрын
Ahh good to know! That's something I haven't used before!
@yotewachirapornpongsa7605
@yotewachirapornpongsa7605 3 жыл бұрын
I've got not found page when call on production {host}/{local}/xxx but it's work on local
@VincentFulco
@VincentFulco 4 жыл бұрын
Thank you.
@leighhalliday
@leighhalliday 4 жыл бұрын
You're welcome, Vincent! Thanks for the support!
@syz3981
@syz3981 4 жыл бұрын
is there any way to do this with next but without showing the lang in the actual path?
@leighhalliday
@leighhalliday 4 жыл бұрын
You can also do it by having different domains for different languages... leighfrench.com vs leighspanish.com, in which case it won't be in the path.
@syz3981
@syz3981 4 жыл бұрын
@@leighhalliday hmm so theres no way of doing it in some sort of state internally and avoiding the url completely ?
@viktornikulin2863
@viktornikulin2863 4 жыл бұрын
Thanks for the review, appreciate it! I tried to work with this feature, but it seems right now it is not compatable with Next's static html export. As I understood, it needs to generate internationalized versions of each page in order to be hosted at CDN. I wonder if there is a workaround, thanks for the review
@leighhalliday
@leighhalliday 4 жыл бұрын
Ahhh bummer... yea, I think it would have to generate one page per locale.
@ordinarynetizen
@ordinarynetizen 4 жыл бұрын
What VS Code theme are you using?
@leighhalliday
@leighhalliday 4 жыл бұрын
One Monokai
@trustlang_ua
@trustlang_ua 4 жыл бұрын
I live in Ukraine. We have many Russian lang web sites. But from today we must use as defaults Ukrainian lang. Also, we use English lang, so we have 3 langs on our sites. This tutorial is very nice and clean.
@leighhalliday
@leighhalliday 4 жыл бұрын
Wow, and I thought it was tough in Canada with 2 languages! Thank you Vlad :)
@avneet12284
@avneet12284 4 жыл бұрын
Great content as usual. Perhaps it could be possible to keep the content in various languages in a CMS like sanity or something. That would make it easier to work with.
@leighhalliday
@leighhalliday 4 жыл бұрын
This isn't something I've done before, but honestly sounds like an amazing idea.
@gablabelle
@gablabelle 4 жыл бұрын
If you have a big app with lots of text and lots of supported locales, you'll also need to think about a strategy to scope/namespace and split these language files into chunks that are loaded only when necessary. I think next-translate can help you achieve that. It only loads the necessary translations (for current page and locale). I'm about to test it at work in a lerna monorepo with lots of packages and locales. Any other suggestions are welcome! Cheers from Montreal. ;-)
@leighhalliday
@leighhalliday 4 жыл бұрын
Hey Gab! Honestly this is something I haven't had to deal with before... the i18n pages I've done have been relatively small. But what you said makes a ton of sense! Split them up on a per page basis.
@_maksime
@_maksime 3 жыл бұрын
{fr: Merci, en: Thanks}
@leighhalliday
@leighhalliday 3 жыл бұрын
{fr: "De rien!", en: "You're welcome!"} :D
@marc-andrequintal570
@marc-andrequintal570 2 жыл бұрын
works well with flatten object, but not with nested object :s
Client and Server Side Cookies in Next.js
12:44
Leigh Halliday
Рет қаралды 60 М.
Internationalization (i18n) with Next.js!
9:16
leerob
Рет қаралды 58 М.
Жездуха 42-серия
29:26
Million Show
Рет қаралды 2,6 МЛН
번쩍번쩍 거리는 입
0:32
승비니 Seungbini
Рет қаралды 182 МЛН
JISOO - ‘꽃(FLOWER)’ M/V
3:05
BLACKPINK
Рет қаралды 137 МЛН
Charging Money with Stripe in Next.js in 15 Minutes
18:22
Leigh Halliday
Рет қаралды 10 М.
Why Signals Are Better Than React Hooks
16:30
Web Dev Simplified
Рет қаралды 496 М.
This is the Only Right Way to Write React clean-code - SOLID
18:23
A Deep Dive into JVM Start-Up
22:03
Java
Рет қаралды 23 М.
Next.js + Strapi - #Internationalization (i18n)
19:08
Watch and Learn
Рет қаралды 17 М.
Improving SEO with (Dynamic) Sitemaps in Next.js
17:29
Leigh Halliday
Рет қаралды 38 М.
Next.js 10 Internationalization (i18n)
24:32
Patrick M
Рет қаралды 41 М.
Жездуха 42-серия
29:26
Million Show
Рет қаралды 2,6 МЛН