How to show translations in Blade files

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
kartikbhat
Posts: 40
Joined: 02 Dec 2021, 17:18

How to show translations in Blade files

Post by kartikbhat » 10 Feb 2023, 13:41

I have created translation keys in shop.php for various languages

how Can I show them on laravel blade files

Code: Select all

$this->translate( 'header', 'activities' ) 

Help me to add proper syntax for this


TIA :)

User avatar
aimeos
Administrator
Posts: 7889
Joined: 01 Jan 1970, 00:00

Re: How to show translations in Blade files

Post by aimeos » 13 Feb 2023, 08:26

In the Laravel Blade files, you have to use its "_()" method for translation adn put the translations into the language folder as JSON files.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

kartikbhat
Posts: 40
Joined: 02 Dec 2021, 17:18

Re: How to show translations in Blade files

Post by kartikbhat » 13 Feb 2023, 08:27

We cannot use those translation keys-value pairs defined under shop.php here in laravel blade files ?

User avatar
aimeos
Administrator
Posts: 7889
Joined: 01 Jan 1970, 00:00

Re: How to show translations in Blade files

Post by aimeos » 15 Feb 2023, 08:04

No, Laravel doesn't support the Aimeos translation via Gettext.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply