Admin template cannot accept the translation from the i18n file
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!
- ahmed31916
- Advanced
- Posts: 148
- Joined: 14 Apr 2022, 12:15
Admin template cannot accept the translation from the i18n file
Hello Aimeos,
I used to translate texts like this : "$this->translate( 'client', 'Text' )" in the client templates folder, of the extension.
Now, I'm trying to edit the translations in the subpart: "packages\test\templates\admin\jqadm\product\item.php", in the admin template, of the extension. I wrote "$this->translate( 'client', 'Text' )", but it cannot accept the translation from the file "packages\test\i18n\en.po". Why?
I used to translate texts like this : "$this->translate( 'client', 'Text' )" in the client templates folder, of the extension.
Now, I'm trying to edit the translations in the subpart: "packages\test\templates\admin\jqadm\product\item.php", in the admin template, of the extension. I wrote "$this->translate( 'client', 'Text' )", but it cannot accept the translation from the file "packages\test\i18n\en.po". Why?
Re: Admin template cannot accept the translation from the i18n file
The translation domain is "admin", not "client" in the admin backend.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
- ahmed31916
- Advanced
- Posts: 148
- Joined: 14 Apr 2022, 12:15
Re: Admin template cannot accept the translation from the i18n file
Ok, also "admin" doesn't work.
In another hand, if I used "admin", where I should to store "en.po" file extended?
In another hand, if I used "admin", where I should to store "en.po" file extended?
Re: Admin template cannot accept the translation from the i18n file
In the ./i18n/ directory of your extension. Please remember that you have to use msgfmt command to create a binary MO file from your .php file:ahmed31916 wrote: ↑06 Nov 2022, 19:51 In another hand, if I used "admin", where I should to store "en.po" file extended?
https://aimeos.org/docs/latest/developer/translations/
The easiest way is to add translations to your ./config/shop.php:
https://aimeos.org/docs/latest/laravel/ ... anslations
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star