Translation with $this->context()->i18n()->dt() not working
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Translation with $this->context()->i18n()->dt() not working
Laravel framework version: 9.52.4
Aimeos Laravel version: ~2022.10
PHP Version: 8.2.3
Environment: Linux
Hello,
I've created a new decorator in the namespace Aimeos\MShop\Order\Manager\Base\Service\Decorator.
I'm attempting to translate this country code inside the search() method:
dump( $this->context()->i18n()->dt( 'client', 'AZ') )
The translation does not work, it returns AZ, when it should return Azerbaijan.
Aimeos Laravel version: ~2022.10
PHP Version: 8.2.3
Environment: Linux
Hello,
I've created a new decorator in the namespace Aimeos\MShop\Order\Manager\Base\Service\Decorator.
I'm attempting to translate this country code inside the search() method:
dump( $this->context()->i18n()->dt( 'client', 'AZ') )
The translation does not work, it returns AZ, when it should return Azerbaijan.
Re: Translation with $this->context()->i18n()->dt() not working
You are using the wrong translation domain and it should be instead:
Code: Select all
$this->context()->translate( 'country', 'AZ' );
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: Translation with $this->context()->i18n()->dt() not working
Thank you, I did have the wrong domain. It works now.