React Multi Language App - i18next Tutorial with React JS

Поділитися
Вставка
  • Опубліковано 1 сер 2024
  • #Javascript #reactjstutorial #ReactJS
    How to make a react app in any language using i18next or react-i18next by building a greetings app with 4 languages. This tutorial is beginner friendly
    ➡️ Book an Interview Preparation call with me ( 20% OFF for limited time ) -
    topmate.io/roadsidecoder
    👤 Join the RoadsideCoder Community Discord -
    / discord
    🟪 Follow me on Instagram else your code will give errors 🤓 -
    / roadsidecoder
    🔗 React JS Interview Series -
    • Frontend Machine Codin...
    🔗 Complete Data Structures and Algorithms with JS Course - • Data Structures and Al...
    🔗 JS Interview Series -
    • Javascript Interview Q...
    🔗 Cars24 Interview Experience -
    • Frontend Interview Exp...
    🔗 Unacademy Interview Experience -
    • Frontend Interview Exp...
    🔗 Tazorpay Interview Experience -
    • Frontend Interview Exp...
    🔗 MERN Stack Tutorial with Redux -
    • MERN Stack Project Tut...
    🔗 React Beginner's Project Tutorials -
    • React JS Project Tutor...
    -------------------------------------------------------------------------
    00:00 Intro
    01:11 Setup a New React App
    03:06 Greetings App UI
    04:09 i18next React Setup
    08:01 Adding Translations
    08:44 useTranslations Hook
    09:48 Language Selector Component
    14:49 Missing Key fallback language
    15:56 Nested Translation Key Handling
    18:12 Handling Right to Left Languages
    20:18 Interpolation
    21:58 Trans Tag in react-i18n
    25:23 Serving Translation files from server
    28:19 Translation Namspaces
    -------------------------------------------------------------------------
    ⭐ Support the channel -
    / @roadsidecoder
    Special Thanks to our members -

КОМЕНТАРІ • 102

  • @RoadsideCoder
    @RoadsideCoder  7 місяців тому

    🔴 Get my Complete Frontend Interview Prep course - roadsidecoder.com/course-details
    🧑‍💻 Source Code - github.com/piyush-eon/i18next-tutorial-yt
    ➡ Book an Interview Preparation call with me ( 20% OFF for limited time ) - topmate.io/roadsidecoder

  • @y3h1_
    @y3h1_ 5 місяців тому +1

    I love these tutorials. Clean and precise. Thank you

  • @alextruong1826
    @alextruong1826 3 місяці тому +1

    I LOVE YOUR TUTORIALS!!! Straight to the points, clean, clear and updated (let alone you always have cherries on top)!!! Thanks a million!!!

  • @shivankchaudhary6107
    @shivankchaudhary6107 6 місяців тому +7

    One of the most thorough explanations based on actual project scenarios. Very helpful, buddy. Keep it up.

  • @olegpupkin6892
    @olegpupkin6892 2 місяці тому

    Great!!! Thats what i was searching for!

  • @joneugster4041
    @joneugster4041 4 місяці тому

    Thank you for this tutorial. I had 2-3 shots at setting up i18next correctly, but always failed until I found your video!

  • @user-ho4mq5cl9y
    @user-ho4mq5cl9y 5 місяців тому +1

    quite descriptive and useful video ... keep it up💛

  • @giorgikiladze1151
    @giorgikiladze1151 5 місяців тому

    thank you, tutorial was helpful

  • @jaroslavfilo4420
    @jaroslavfilo4420 Місяць тому

    Thank you very much. You helped me a LOT!

  • @luchonieves
    @luchonieves 2 місяці тому

    What a great video brother, I understood everything thanks to you! Keep it up 😎

  • @OzzinhoTV
    @OzzinhoTV 2 місяці тому

    My maaaan! You just won a new suscriber!!!! thx

  • @wannapaing1997
    @wannapaing1997 20 днів тому

    thank a lot, guy, it will helpful a lot.

  • @_TamannaTahsin_A
    @_TamannaTahsin_A 2 місяці тому

    handsdown the best tutorial

  • @mohammadabbas1623
    @mohammadabbas1623 7 місяців тому

    U always come up with new content

  • @Khedhar108
    @Khedhar108 7 місяців тому +1

    i18next configuation : "6:08"
    same key for same content but in different languages : "8:00"
    useTanslation hook with key : "9:07" translating object : "16:56"
    changing data dynamically coming in json format from backend - interpolation {{channel}} : "20:22"
    apply styling dynamic data Trans : "22:04"
    different languages translation in different files : "25:25"
    task : make translation json file for different pages : ""

  • @SemicolonGuy
    @SemicolonGuy 7 місяців тому +1

    This is something which we all should do irrespective of project requirements. Even if we don’t need internationalisation in our app, we should define existing texts in this manner only.
    It will benefit in scaling the project

  • @Jacky-rc6mu
    @Jacky-rc6mu 17 днів тому

    best tutorial ever watch

  • @prashlovessamosa
    @prashlovessamosa 7 місяців тому

    Thanks for sharing.

  • @houriayaseen5487
    @houriayaseen5487 6 місяців тому

    I have subscriped just cuz of the awesome explanation 🔥

  • @nishachapte7
    @nishachapte7 7 місяців тому

    Amazing Thanks

  • @akashpatil9043
    @akashpatil9043 7 місяців тому

    Bhai be lated happy birthday, or mai yahi dekhna cahata tha apne product me use karne ke leye, dashboard ke leye foreign clients ke leye 😊. Thanx bro

  • @ArshadKhan-vn9sn
    @ArshadKhan-vn9sn Місяць тому

    Very nice but for large content website we need to add all translation in our react js do we have any library so that atleast 60-70 percent of translation it can handle and for some content which is not getting translated we can translate it?

  • @soundhirarajk9565
    @soundhirarajk9565 7 місяців тому

    Thanks for sharing...

  • @abhaypatil5880
    @abhaypatil5880 7 місяців тому

    I am using the same interpolation technique, to chnage the value entered in the Input to be transalted to french but it's not converiting if someone can help I can share my code

  • @pupil_1
    @pupil_1 6 місяців тому

    can you make one more video , like by using API instead of storing in forntend

  • @HigherStudyAspirant
    @HigherStudyAspirant 5 місяців тому

    what if we get the translation from backend API, how to map in that case?

  • @kondraramesh
    @kondraramesh 5 місяців тому

    please do video on auto generate translation.json using npm package

  • @growwithdesign
    @growwithdesign 5 місяців тому

    Hello. Thankyou for making this tutorial. I have a question. My components have api file where I am storing information for all my grid child elements. Now, how do I assign language translations to them inside my api file?

  • @harratabdelmalek2062
    @harratabdelmalek2062 5 місяців тому

    I love u man ❤

  • @havefun5519
    @havefun5519 7 місяців тому

    An informative tut video

  • @nicatqarayev2348
    @nicatqarayev2348 7 місяців тому +3

    So how do they translate the data coming from the API? Most of the time, words like .../en .../fr .../hi are added to the end of the url. Is this because these words are added to the API endpoints? In other words, when a request is made to /en, English data is received, and when a request is made to /fr, French data is received.

    • @nicatqarayev2348
      @nicatqarayev2348 7 місяців тому +1

      If it is done as I think, data should be added in 3 languages in the dashboard, right? Can you explain how these things are done in real life?

  • @growwithdesign
    @growwithdesign 5 місяців тому

    Also, for your future videos, for arabic - it's not just the language, but the layout also changes RTL. Please demonstrate how can we also change the layout for RTL.

  • @asghani2143
    @asghani2143 6 місяців тому

    I am getting error text content does not match server-rendered html. It happened when I tried to make separate files for different components

  • @udittyagi9238
    @udittyagi9238 7 місяців тому

    Superb video ❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤

  • @muhammadabozaid8319
    @muhammadabozaid8319 4 місяці тому

    very good 😃

  • @SINGH-jp6ju
    @SINGH-jp6ju 5 місяців тому +3

    So, if I have a large website, I will have to put in a lot of effort to translate each line of content into a different language. So, can you suggest any other approach that is simple and converts my full website language into the required language?

    • @VinayakPhal
      @VinayakPhal 2 місяці тому

      Use some translation tools which can automatically translate using service like Google translate. And all the best with translated locale.

    • @VinayakPhal
      @VinayakPhal 2 місяці тому

      Or you can give to any ai tool to translate it into another language.

  • @naufalnasrullah6965
    @naufalnasrullah6965 7 місяців тому

    nice video sir

  • @ajayks3815
    @ajayks3815 17 днів тому

    bro using this we can only translate static texts?

  • @nikhilgowda7511
    @nikhilgowda7511 7 місяців тому +1

    Continue DSA series

  • @auslanderwichtig4060
    @auslanderwichtig4060 7 місяців тому

    Best Chanel for frontend developers

  • @idontknowWhatTosay8
    @idontknowWhatTosay8 5 місяців тому

    good tut but still didnt got how to translate words from api..

  • @MrColins710
    @MrColins710 6 місяців тому

    The best lessons ever. Greetings from Ukraine.

  • @vkchauhangoldy1068
    @vkchauhangoldy1068 3 місяці тому

    @RoadsideCoder on page refresh language is changing to en in local storage

  • @mostafizurrahmanchowdhury9018
    @mostafizurrahmanchowdhury9018 Місяць тому

    Is it work for also next.js?

  • @KartikKatwal
    @KartikKatwal 17 днів тому

    not for large websites

  • @xtech5881
    @xtech5881 6 місяців тому

    This is static data..what about real world scenario like..i have multiple components..booking page..list page and all..then how can we do..this to all component..

    • @manekedark
      @manekedark 6 місяців тому +1

      you need to use async/await or RxJS

  • @MohamedAymanpro
    @MohamedAymanpro 3 місяці тому

    Peace be upon you. I am a user of the i18next website on a site like this, and I am on the page work and i'm creating data in a js spicial file , not a json file, and the data viewer is on the page work with map function. I want to translate the file containing the data. I don't know how to connect it, and there's nothing in it that explains what I mean by it. All that is available is that it translates a sentence or two, not the entire file into a single file. please help.

  • @akashpatil9043
    @akashpatil9043 6 місяців тому

    Bhai leken agar Data API se aaraha horo usko kaise change karenge ?🤔

  • @rahil1575
    @rahil1575 7 місяців тому

    I am using the usetranslation with in a usestate hook and it is not working . Can you suggest anything reg this

  • @rmrm-nk1ii
    @rmrm-nk1ii 7 місяців тому

    👏

  • @manojsatwase
    @manojsatwase 7 місяців тому

    make a video on polyfill useState hook From Scratch

  • @anilkumarjena6793
    @anilkumarjena6793 7 місяців тому

    When Change the language, How to change also time in our website..

    • @RoadsideCoder
      @RoadsideCoder  7 місяців тому

      Check this out - www.i18next.com/translation-function/formatting

  • @awais_ansarii
    @awais_ansarii 7 місяців тому

  • @rishiraj2548
    @rishiraj2548 7 місяців тому

    Good day greetings

  • @speedxksi_clips
    @speedxksi_clips 3 місяці тому

    Wait, do I have to rewrite all the translations content manually?

  • @Ganesh-ld8ph
    @Ganesh-ld8ph 7 місяців тому +3

    2000 years latter 😂

  • @_Elfaro
    @_Elfaro 23 дні тому

    So i need to translate every sentence and word in my app even if it's freaking big?

  • @Ankit-01-01
    @Ankit-01-01 7 місяців тому

    Name the extension to auto import react components

    • @RoadsideCoder
      @RoadsideCoder  7 місяців тому

      ES7+ React/Redux/React-Native snippets

    • @Ankit-01-01
      @Ankit-01-01 7 місяців тому

      @@RoadsideCoder not working

    • @RoadsideCoder
      @RoadsideCoder  7 місяців тому

      @@Ankit-01-01 just search it in extensions tab of VS Code

  • @akashpatil9043
    @akashpatil9043 7 місяців тому

    Bhai leken iske state ko mamage kaise karke rakhe, agar page ko koi reload kare to ?

    • @RoadsideCoder
      @RoadsideCoder  7 місяців тому

      i18n will automatically persist the state by using localstorage

    • @akashpatil9043
      @akashpatil9043 7 місяців тому

      Thanx bhai sone me suhaga bhai 😁

  • @ShivamKumar-xv5ch
    @ShivamKumar-xv5ch 7 місяців тому

    company m yhi krna h talk about timing

    • @RoadsideCoder
      @RoadsideCoder  7 місяців тому

      Hahah great! Dont forget to share 🤓

  • @jacquelynecarmen
    @jacquelynecarmen 6 місяців тому

    so we need to write our whole app in multi lang?

  • @sauravraj6840
    @sauravraj6840 7 місяців тому

    main ye already use kiya hoon apne project me😅

  • @RinguRajaTemp
    @RinguRajaTemp 4 місяці тому

    Github repo link please

  • @aashish_stanl
    @aashish_stanl 5 місяців тому

    how many years of experience do you have brother?

  • @pranupranav5563
    @pranupranav5563 27 днів тому +1

    Translator❌ Hashmap✅

  • @rubynathanrubynathan2875
    @rubynathanrubynathan2875 7 місяців тому

    Hi bro

  • @sayamrahmanrobin2969
    @sayamrahmanrobin2969 4 місяці тому

    BEST

  • @MathsWithSatyamPandey
    @MathsWithSatyamPandey 7 місяців тому +1

    Hello bhaiya I create a video for top 10 best youtube channel for web development. And also mention your Channel name. And upload on youtube and Instagram. Because you are best educator for beginners. ❤ thanks bhaiya 🙏 .
    Programming with satyam - my channel name

  • @kuldeepchouhan0143
    @kuldeepchouhan0143 7 місяців тому

    LinkedIn id :

  • @anilkumarjena6793
    @anilkumarjena6793 7 місяців тому

    When Change the language, How to change also time in our website..

    • @SemicolonGuy
      @SemicolonGuy 7 місяців тому

      Generally, We don’t do that in our application. We take the time from browsers which takes it from the Operating system.
      Timezone should be as per users local time and hence we avoid changing it