How to extend language file en.po

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
ahmed31916
Advanced
Posts: 148
Joined: 14 Apr 2022, 12:15

How to extend language file en.po

Post by ahmed31916 » 31 May 2022, 08:54

Hello,

I'm trying to overwrite the "en.po" file. I copy the file from the vendor, and paste it inside the path:
"packages\theme2\i18n\currency\en.po". But it didn't accept the translation from this file.

What did I do wrong?

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

Re: How to extend language file en.po

Post by aimeos » 01 Jun 2022, 05:25

The .po files need to be compiled into the MO file format:

Code: Select all

msgmft -o en.po en
See here: https://aimeos.org/docs/latest/developer/translations/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
ahmed31916
Advanced
Posts: 148
Joined: 14 Apr 2022, 12:15

Re: How to extend language file en.po

Post by ahmed31916 » 27 Jul 2022, 08:30

executing this command "msgmft -o en.po en" returns this error message:

Code: Select all

'msgfmt' is not recognized as an internal or external command,
operable program or batch file.
OS: windows

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

Re: How to extend language file en.po

Post by aimeos » 28 Jul 2022, 04:55

For Windows, you need the Cygwin environement with the Gettext tools installed.

Alternatively, you can add your translations to your ./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

User avatar
ahmed31916
Advanced
Posts: 148
Joined: 14 Apr 2022, 12:15

Re: How to extend language file en.po

Post by ahmed31916 » 28 Jul 2022, 13:16

thanks, I installed poedit program. It converts the .po file. It works.

Post Reply