Translate email order

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!
User avatar
AleksandarJovanovic
Posts: 53
Joined: 01 Jun 2022, 21:26

Translate email order

Post by AleksandarJovanovic » 29 Oct 2024, 19:32

Php 8.2
Linux
Version 2024.10.

Hi,
How to translate email of order information.
Example i want to translate Dear ... Thank you for your order 29 from 2024-10-29.
Where to put i18n folder in created packages to translate.

Thank you

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

Re: Translate email order

Post by aimeos » 30 Oct 2024, 17:45

You can find the original strings in the template file(s), e.g.:
https://github.com/aimeos/ai-controller ... /html.mjml

To translate the string, you have to create a PO file (e.g. "en.po" and use the header from the en.po file from the aimeos/ai-controller-jobs extension) and add:

Code: Select all

msgid "Thank you for your order %1$s from %2$s."
msgstr "On %2$s we've received your order %1$s."
Then, you have to compile the file to a binary MO file. For more details, please have a look here:
https://aimeos.org/docs/latest/developer/translations/

Alternatively, you can add the translation also to the ./config/shop.php file:
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

Post Reply