Search code examples
laravellocalelaravel-blademultilingual

Use two or more locale translations at same time in same page in Laravel?


I am using Laravel 8. How I can show translation for two or more lang on the same page. Please see the image below:

enter image description here

Any idea how I can achieve this. Thanks in advance.


Solution

  • You can pass a third argument to the __ function.

    For example:

    {{ __('Address', [], 'en') }} 
    

    https://laravel.com/docs/8.x/localization#retrieving-translation-strings

    Definition of that helper function you can find here.