Localise React Applications Using I18Next

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 มิ.ย. 2020
  • 📘New Course: Build full-stack React Typescript applications tsreact.maksimivanov.com/s/ytd
    How to localise React applications using React i18next.
    #i18n #localise
    Code: github.com/satansdeer/react-i18n
    Discord: / discord
    Free React Testing Checklist: eepurl.com/c_8tzP

ความคิดเห็น • 100

  • @MrFckingninja
    @MrFckingninja 4 ปีที่แล้ว +35

    Eventhough you don't have milions of views, you still make better content than other dev channels :) keep it up bro!

  • @MisterNorthernCanuck
    @MisterNorthernCanuck 3 ปีที่แล้ว +3

    No messing around, love it. Thank you.

  • @Radonated
    @Radonated 3 ปีที่แล้ว +4

    Awesome, no bullshitting, straight to the topic! You're the man :) Greetings from Poland

  • @samiraawad
    @samiraawad 4 ปีที่แล้ว +1

    straight to the point , thank you !

  • @oleksiip2401
    @oleksiip2401 3 ปีที่แล้ว +1

    До вашего видео не мог реализовать данную функцию без костылей, а по документации не разобрался в силу неопытности. Спасибо

  • @MisterNorthernCanuck
    @MisterNorthernCanuck 3 ปีที่แล้ว +3

    Any chance for an ETA on that Backend example? I just can't figure out what this backend plugin wants, what should be returned by the endpoint, etc.

  • @HopOnWithDebarshiPoulamy
    @HopOnWithDebarshiPoulamy 7 หลายเดือนก่อน

    Simple and to the point. Thanks a lot.

  • @bellejemabantilan1660
    @bellejemabantilan1660 9 หลายเดือนก่อน

    Thank you for this knowledge :)

  • @ProShoTPS5
    @ProShoTPS5 2 ปีที่แล้ว

    Hi @Maksim , Is there a way we can code split the language files and only add those keys to the main json which is required on the screen instead of loading all the keys in a json file. can we lazy load these?

  • @zerocodercool
    @zerocodercool 3 ปีที่แล้ว

    Nice and concise Maksim. good share man!

  • @MorkusReX
    @MorkusReX 3 ปีที่แล้ว

    Help please: I can't figure out how to use this with local translation.json files. Client side only. Backened only tries http requests and I'm not sure how to configure a local path (/public/locales/trasnlations.json). It works when I use "npm start" but not if I run "npm run build".

  • @ayoubdev8019
    @ayoubdev8019 4 ปีที่แล้ว

    I'm new here , actually i was searching for react forms and i found ur video about react hook form and it helps me a lot and ur content its sooooo amazing... #new subscribe for you bro, Thanks a lot , keep doing it

  • @SvetaSveta-ms4hi
    @SvetaSveta-ms4hi 3 ปีที่แล้ว

    Wow! That's so awesome! Thanks a billion! 🙏🌞

  • @haythamaldamen3578
    @haythamaldamen3578 3 ปีที่แล้ว

    Thank you very much, It was wonderful method to understand i18Next

  • @user-wn6qu3xb2l
    @user-wn6qu3xb2l 7 หลายเดือนก่อน +1

    it doesn't work for me with the json fil
    unless i used directly in my i18n file

  • @OrangeLightning99
    @OrangeLightning99 3 ปีที่แล้ว

    This was very helpful, thanks

  • @alexanderzelenkov6944
    @alexanderzelenkov6944 ปีที่แล้ว

    Cool!
    Hi from Krasnoyarsk!

  • @deri5038
    @deri5038 3 ปีที่แล้ว +2

    Apreaciate your video, i love it :D. btw i confuse when refreshing page the language change to default, how to save the chosen language on reload using cache / cookies?

  • @iqbalsyafri8888
    @iqbalsyafri8888 ปีที่แล้ว

    how if we implement using local storage?
    cause if user refresh the page, lang that choosed before will change

  • @kirankamath5891
    @kirankamath5891 4 ปีที่แล้ว

    You used object to store the 2 languages part right?

  • @zahidshaikh3122
    @zahidshaikh3122 2 ปีที่แล้ว

    Nice information, with a very Nice Thumbnail :))

  • @quachhengtony7651
    @quachhengtony7651 2 ปีที่แล้ว +1

    I'm not sure what i18next-http-backend does. Can anyone explain it to me?

  • @sergeypushkovskiy5790
    @sergeypushkovskiy5790 4 ปีที่แล้ว +11

    In your video you created files for localization, but where do you provide paths to these files?

    • @UmeshVerma-pi8oi
      @UmeshVerma-pi8oi 2 ปีที่แล้ว +2

      i18next-http-backend package by default, expects to load translation files from the public/locales/{lng}/translation.json directory where lng is the language code.

  • @ryanadhi
    @ryanadhi 3 ปีที่แล้ว

    why there are log in our web console from i18n whenever our web start?

  • @indusamarasinghe7725
    @indusamarasinghe7725 3 ปีที่แล้ว

    how to get localization with the url website/en or de,es ?

  • @websidevteam3046
    @websidevteam3046 3 ปีที่แล้ว

    Thank you a lot!

  • @jyothsnapal7161
    @jyothsnapal7161 3 ปีที่แล้ว

    How to append language code to the URL when we switch the language?

  • @murodmazbutov2272
    @murodmazbutov2272 3 ปีที่แล้ว +1

    after restart page goes to main language how can we fix it? can you help me pl?

  • @nikitastriuk
    @nikitastriuk 3 ปีที่แล้ว +3

    Huge thanks for this lesson.
    What if we need to translate a variable outside of the React component?
    For example some shared labels variable from constants.js file (which was used in different files). Translation appears only after page refreshing. Any workaround?

    • @jogre900
      @jogre900 ปีที่แล้ว

      Impor i18next in the costants file, the make a instance of t function..

  • @moammerkhalil6096
    @moammerkhalil6096 2 ปีที่แล้ว

    Hi, it works only in localhost:3000 but when I do npm run build the app can't locate the translation files and display error message: i18next.js:27 i18next::backendConnector: loading namespace translation for language en failed failed parsing /locales/en/translation.json to json

  • @ssi613
    @ssi613 3 ปีที่แล้ว

    Great video !

  • @dunklerKurfurstDesDeepstat
    @dunklerKurfurstDesDeepstat 2 ปีที่แล้ว

    thanks Mate!

  • @saulvo
    @saulvo 3 ปีที่แล้ว

    thank you very much 👍

  • @marcoavila5076
    @marcoavila5076 2 ปีที่แล้ว

    How do you do it with react typescript? i'ts giving me errors :c

  • @korvinkori_
    @korvinkori_ 2 ปีที่แล้ว

    Thank you for the video, how can we take translation from other sources like db?

  • @polynomen
    @polynomen 2 ปีที่แล้ว

    Why install also react-i18next ? Isn't i18next enough ?

  • @HearonPlay
    @HearonPlay 3 ปีที่แล้ว

    Thank you !

  • @magikarp2063
    @magikarp2063 2 ปีที่แล้ว

    I need one language to be in italic. How to do this with the t function?

  • @DrRus12
    @DrRus12 4 ปีที่แล้ว

    Все кратко и понятно) Спасибо!

  • @CTSGLOBALTrading
    @CTSGLOBALTrading ปีที่แล้ว

    Where did you tell i18next that your locales are in the public folder ?????

  • @annasamoylenko3804
    @annasamoylenko3804 3 ปีที่แล้ว

    Nice video) But how we can use locale files from server - not from front-end part?

  • @mohaned1217
    @mohaned1217 ปีที่แล้ว

    It doesnt work for me. Nothing appears when I run the code

  • @toannew
    @toannew 2 ปีที่แล้ว

    thank you

  • @makkahwi
    @makkahwi 3 ปีที่แล้ว +1

    Hi, beside the steps in video, how could I control the website direction according to language (RTL & LRT)?

    • @bouhannacheabdallah
      @bouhannacheabdallah 2 ปีที่แล้ว

      Just Check current lang nd provide the appropriate attr dude

  • @nitinsaini3421
    @nitinsaini3421 ปีที่แล้ว

    How can i Api data convert to other language?

  • @akashshrestha01
    @akashshrestha01 3 ปีที่แล้ว

    great

  • @artedza
    @artedza 4 ปีที่แล้ว +3

    спасибо!

  • @hp___n_
    @hp___n_ 2 ปีที่แล้ว

    Thanks for keeping the video short to the point.

  • @ArtiomNeganov
    @ArtiomNeganov 2 ปีที่แล้ว

    It's sad you haven't provided any example of using the back-end. Why are you adding it at 0:48 at all? I didn't find also any follow-ups on this topic on your channel.

  • @mrsoneji
    @mrsoneji 3 ปีที่แล้ว

    +1 for vim plugin

  • @snickers3710
    @snickers3710 3 ปีที่แล้ว

    nice one

  • @abbassultan4315
    @abbassultan4315 4 ปีที่แล้ว

    nice one Maksim, and to the point as usual ;) is it possible to use this solution to integrate different api calls for different languages PLUS the locales you added in this tutorials?

    • @satansdeer1
      @satansdeer1  4 ปีที่แล้ว

      Hmm, Abbas, could you clarify what do you mean by applying languages to the api calls?

    • @abbassultan4315
      @abbassultan4315 4 ปีที่แล้ว

      @@satansdeer1 when I have 2 languages for the web app, and there's 2 apis urls one for each language... Plus some static translation done only in frontend and not coming through apis (ex: Read more, show less... etc). What the best way to apply this scenario?!
      Also what about the /urls and seo? Will search engine be able to crowl different languages?
      Thanks

    • @satansdeer1
      @satansdeer1  4 ปีที่แล้ว +1

      @@abbassultan4315 yes, because the urls will be different (we serve different language depending on query params). As for APIs we usually don't localize them and perform all the localization on the frontent. The API are only returning the values. Also it might help if you use the base translation as the key for translaiton. I'll show how to do it in one of the next videos

  • @user-lr5mf4qb6g
    @user-lr5mf4qb6g 2 ปีที่แล้ว

    Спасибо большое!

  • @jonmartirosyan1587
    @jonmartirosyan1587 4 ปีที่แล้ว

    cool thanks

  • @hasanablak
    @hasanablak ปีที่แล้ว

  • @petermashine1483
    @petermashine1483 6 หลายเดือนก่อน

    спасибо!!!

  • @danishali_official
    @danishali_official 3 ปีที่แล้ว

    its working

  • @sAnnyguy
    @sAnnyguy 4 ปีที่แล้ว

    Hey. How can I save the language in local storage or cookie? If I select german language after page relaod it should be also german.

    • @satansdeer1
      @satansdeer1  4 ปีที่แล้ว +1

      You can but I would keep it as a part of the URL

    • @sAnnyguy
      @sAnnyguy 4 ปีที่แล้ว

      @@satansdeer1 Much better solution. But how does that work?

  • @ibrahimbenmesbah5896
    @ibrahimbenmesbah5896 2 ปีที่แล้ว

    Hello, thank you for this best tutorial. i have classe with mobx react how i can define constants t and i18n ? thank you

  • @user-he4rw3mv8o
    @user-he4rw3mv8o 3 ปีที่แล้ว

    Спасибо!

  • @oleksiip2401
    @oleksiip2401 3 ปีที่แล้ว

    Спасибо)

  • @kristianlonergan2920
    @kristianlonergan2920 4 ปีที่แล้ว

    Nice quick and easy tutorial! Could you do a video on supporting different datetime formats for different locales ? (with a library like moment etc..)
    Keep up the good work, I subscribed :D

  • @jonikstyle8290
    @jonikstyle8290 3 ปีที่แล้ว

    Спасибо очень помог)

  • @sunnychiu1613
    @sunnychiu1613 4 ปีที่แล้ว +1

    want to learn more for i18n!

  • @kingofgeeks
    @kingofgeeks 4 ปีที่แล้ว +1

    I'd be really interested to see the localizations being loaded from a dynamic source. For example, what if you stored all of your localization strings in Google Firebase or Firestore?

    • @satansdeer1
      @satansdeer1  4 ปีที่แล้ว +1

      mobiGeek it is a static file, you don't store it in the database, but yeah, I'll show it in one of the next vids

    • @kingofgeeks
      @kingofgeeks 4 ปีที่แล้ว

      @@satansdeer1 I want it to come from a database 🙂
      Goal is to then allow an admin UI so that non-technical users can modify localized strings "on the fly".

    • @osta6212
      @osta6212 3 ปีที่แล้ว +3

      ​@@kingofgeeks Just fetch it from the database as a JSON and use it

    • @banjonsavalley
      @banjonsavalley 2 ปีที่แล้ว

      @@satansdeer1 Hello Maksim, thank for such a nice content. Restlessly waiting for your video where you can provide a content for dynamic data e.g from json or database. Thanks

    • @parvezshaikhjr
      @parvezshaikhjr ปีที่แล้ว

      @@satansdeer1 Is the video out?

  • @sergeypushkovskiy5790
    @sergeypushkovskiy5790 4 ปีที่แล้ว

    Отличный туториал

  • @aldilavokrid1734
    @aldilavokrid1734 2 ปีที่แล้ว

    I guess it would be similar for react native? I'll try it
    Thanks for the video

  • @Wynell
    @Wynell 3 ปีที่แล้ว

    У меня этот акцент почему-то мурашки вызывает 😬 а видос классный

  • @rahmadabuzar5060
    @rahmadabuzar5060 ปีที่แล้ว

    why everyone does exacly what they said in toturials???? if you can, make one without button so it detects the language from browser and change automaticly.

  • @felipeschulz2485
    @felipeschulz2485 3 ปีที่แล้ว

    Thanks for the videos Maksim, they help me a great deal!
    One suggestion though: would be nice if you desactivate the autocompletion feature when doing your recordings. It's nice that your videos are fast, they save a lot of time, but those autocompletion suggestions are really getting in the way a lot.
    Best regards

    • @satansdeer1
      @satansdeer1  3 ปีที่แล้ว +1

      thanks Felipe, i got rid of them (mostly) in my new videos

  • @FanaticoSama
    @FanaticoSama 4 ปีที่แล้ว

    I tried this the other day, but ended removing the React.Suspense, it was bugging my @material-ui animations

    • @satansdeer1
      @satansdeer1  4 ปีที่แล้ว

      Hm, do you have a repo or a gist to show what it was? I'd like to try as well

  • @purleedef
    @purleedef 2 ปีที่แล้ว

    This video doesn't address importing the json resources at all.

  • @maxim7603
    @maxim7603 3 ปีที่แล้ว

    Спасибо, всё понятно

  • @MIHANIZM56
    @MIHANIZM56 4 ปีที่แล้ว

    and in that case you can use the translations only in render (((((

  • @AndrewFloatrx
    @AndrewFloatrx 2 ปีที่แล้ว

    4 минуты и все понятно! Найс

  • @talkohavy
    @talkohavy 3 ปีที่แล้ว +2

    Fast and unclear.

  • @stormd2902
    @stormd2902 2 ปีที่แล้ว

    чувак, жаль, что ты не сделал и на русском тоже

  • @user-wl2xp8yo6x
    @user-wl2xp8yo6x ปีที่แล้ว

    ох уж этот акцент :)

  • @rajasekhar2053
    @rajasekhar2053 ปีที่แล้ว

    Trans component..thats funny

  • @How2Forex
    @How2Forex 2 ปีที่แล้ว

    One hell gross thumbnail