Overriding Status Names

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!
jafo66
Posts: 26
Joined: 06 Mar 2024, 04:42

Overriding Status Names

Post by jafo66 » 16 Apr 2024, 19:00

I would like to change the name of the statuses used in the admin panels. This code seems pretty standard:

Code: Select all

          'status' => ['op' => '==', 'type' => 'select', 'val' => [
		'1' => $this->translate( 'mshop/code', 'status:1' ),
		'0' => $this->translate( 'mshop/code', 'status:0' ),
		'-1' => $this->translate( 'mshop/code', 'status:-1' ),
		'-2' => $this->translate( 'mshop/code', 'status:-2' ),
	]],
I tried overriding in the shop.php under i18n, en, mshop but that didn't work. I also tried adding values to mshop, i18n, en which didn't work.

Can you let me know how I would make that change?

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

Re: Overriding Status Names

Post by aimeos » 18 Apr 2024, 11:29

The translation domain is "mshop/code":

Code: Select all

'i18n' => [
    'en' => [
        'mshop/code' => [
            'status:1' => ['Active'],
        ],
    ],
],
See also: https://aimeos.org/docs/latest/laravel/ ... anslations
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

jafo66
Posts: 26
Joined: 06 Mar 2024, 04:42

Re: Overriding Status Names

Post by jafo66 » 18 Apr 2024, 14:35

Thanks!

Post Reply