Localization In Laravel 11

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

КОМЕНТАРІ • 21

  • @ramilsalayev4217
    @ramilsalayev4217 13 днів тому +1

    THANK YOUU my friend, you saved me

  • @marcioclaudiotimoteo1046
    @marcioclaudiotimoteo1046 23 дні тому +2

    Thanks!!!!

  • @ttn-i7u
    @ttn-i7u 4 місяці тому +1

    THANK YOU !!!!! I've been struggling with this for so long

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

    I'm grateful for this fantastic tutorial.

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

    Thank you bro, it works perfectly!

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

    Thank you !
    What if data comes from database and you want to perform localisation on url too ?

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

    Helped a lot. Thank you!

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

    Thank you for the nice explanation... I want to translate the file into Arabic as well, but the...dir = ltr أو I don't know how, can you explain this to us?

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

    thanks a lot it's working

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

    Thank you very much

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

    Is there a specific reason to put the formula in a separate controller rather than in the route?
    Route::get('language/{locale}', function ($locale) {
    App::setLocale($locale);
    Session::put('locale', $locale);
    return back();
    });

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

    Thank you! How to show languages prefix on route?

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

      just change endpoint to /{lang} instead of locale/{lang} in web.php , dont forget to change to href target in view. Then in controller you need to remove return back and inside if you need to add return view('...');

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

    why Session::get('locale') always return NULL on midleware? laravel 11

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

      i managed it work by using
      $locale = session('locale') ?? 'en';
      I think it depend on driver setting

  • @matteomontani4644
    @matteomontani4644 6 місяців тому +2

    150 points for Gryffindor

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

      Thanks for the Gryffindor points! Much appreciated! Go Gryffindor!

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

    work in 10?

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

    thanks but please also explain in urdu or english

  • @meytii._
    @meytii._ 7 днів тому

    You saved my life. Thank you so much. 🙏🏻🫂