laravel translations & localization

Поділитися
Вставка
  • Опубліковано 11 вер 2024

КОМЕНТАРІ • 20

  • @DesignatedCoder
    @DesignatedCoder  11 місяців тому +2

    Let's explore translations/localization for Laravel Project.
    We will only be using the default authentication setup with Laravel and Breeze.
    ⚠ Update: I used 'Registered' in one of the language files during the video instead of 'Register'. I've updated the code to reflect the change. ⚠
    ===================================================
    📓 Video Chapters:
    00:00 Laravel Translations & Localization
    06:50 Create English, Spanish and Arabic Translations for Register blade
    20:46 Custom Json Translations for English, Spanish and Arabic
    26:16 Create a Language Switcher
    ===================================================
    ✔ Click to subscribe: ua-cam.com/channels/GRi3eupIN5rOP_tDLxLs2w.html
    ===================================================
    ✔ GITHUB REPO: github.com/designatedcoder/laravel_translations_with_auth_demo
    ===================================================
    📷 Thumbnail Background Image:
    Image by Gino Crescoli from Pixabay: pixabay.com/users/absolutvision-6158753/?
    ===================================================
    DISCLAIMER: Links included in this description might be affiliate or referral links. If you purchase a product or service with the links that I provide I may receive a small commission. There is no additional charge to you! Thank you for supporting my channel so I can continue to provide you with free content each week!
    //SUPPORT THE CHANNEL:
    ○ Buy Me a Beer: tinyurl.com/beeeers
    //FOLLOW ME:
    ○ Twitter: twitter.com/DezignatedCoder
    //TOOLS & SERVICES I USE:
    ○ Get $100 or more free credit for 60 days from DigitalOcean: tinyurl.com/dopromo
    #designatedcoder #laravel #laravellocalization

  • @mdazhardware
    @mdazhardware 11 місяців тому +1

    Thanks for this awesome video, it was very helpful for me.

    • @DesignatedCoder
      @DesignatedCoder  11 місяців тому +1

      Hey there @mdazhardware. Thanks for watching. Welcome to the channel! 😎

  • @vugarkhalil
    @vugarkhalil 11 місяців тому +1

    Wow ❤
    Respect

  • @HamadAbdulla_7
    @HamadAbdulla_7 11 місяців тому +1

    Great video

    • @DesignatedCoder
      @DesignatedCoder  11 місяців тому

      No worries, @HamadAbdulla_7. Glad you're enjoying the channel! 😎

  • @vugarkhalil
    @vugarkhalil 10 місяців тому

    Great 👍

  • @marcinmaj3609
    @marcinmaj3609 11 місяців тому +1

    With inertiajs?

    • @DesignatedCoder
      @DesignatedCoder  11 місяців тому

      No worries, @marcinmaj3609. Glad you're enjoying the channel! 😎 Maybe next week

  • @artemunix5223
    @artemunix5223 11 місяців тому +1

    can you show me how to make nested multi categories?

    • @DesignatedCoder
      @DesignatedCoder  11 місяців тому

      Hey there @artemunix5223. Thanks for watching. Welcome to the channel! 😎 Nested multi categories? I don't understand the question

    • @artemunix5223
      @artemunix5223 11 місяців тому +1

      @@DesignatedCoder nested set multilang categories en => "Hello" => 'Marc'
      es => "Hola" => 'Marko'
      de => "Hallo" => 'Margos'

    • @DesignatedCoder
      @DesignatedCoder  11 місяців тому

      ah ok. I don't think it's meant to be used that way. The translation system that's baked into Laravel works by using the file names instead of like you're example. If you don't want to use that and want to use you're method instead, you may not be able to use the translation strings to translate. You might be able to use a package for that kind of system. We're only using the default in this example.

    • @artemunix5223
      @artemunix5223 11 місяців тому +1

      @@DesignatedCoder What about multilingual tags and categories?

    • @DesignatedCoder
      @DesignatedCoder  11 місяців тому

      Laravel translates strings so if you want strings on your categories and tags, you can put the __('whatever your category or tag string here'). If you're trying to do it from the db then you might want to look into some packages that set up translations for the database as the default Laravel setup doesn't do that out of the box. Hope this helps and good luck to you.

  • @julienSibille
    @julienSibille 11 місяців тому +1

    What about lang selector but with DB data ? I mean, user is on /en/blog/blog-post-title, he switches to fr locale, how to get him to /fr/blog/titre-en-français

    • @DesignatedCoder
      @DesignatedCoder  11 місяців тому

      Hey there @julienSibille. Thanks for watching. Welcome to the channel! 😎 I'm not sure you can translate the string route directly from the routes file. If you're trying to do it from the db then you might want to look into some packages that set up translations for the database as the default Laravel setup doesn't do that out of the box. Hope this helps and good luck to you.

    • @julienSibille
      @julienSibille 11 місяців тому +1

      ​@@DesignatedCoder Ok thanks, will try to find a solution !