Page 1 of 1

How to work with Language files, .po files and overriding

Posted: 20 Apr 2016, 21:50
by pbgswd
Hi we are working with Aimeos for Laravel and we are doing all we can to understand the software. I havent worked with .po files before and it appears there is a source and compiled version of the file. I dont know what package is used to publish these files. Can anybody tell me?
But I did ask an aimeos developer directly before posting here, and the answer was:
You don't need to. If you want to replace only some strings, you can
overwrite them via the configuration file.
Ok well that is ok, but where is this configuration file?

dev@ubuntu-dev:~/ilar/vendor/aimeos/aimeos-core$ find -type f -name "en.po"
./lib/mshoplib/i18n/en.po
./lib/mshoplib/i18n/code/en.po
./controller/frontend/i18n/en.po
./controller/jobs/i18n/en.po
./client/i18n/country/en.po
./client/i18n/currency/en.po
./client/i18n/en.po
./client/i18n/code/en.po
./client/i18n/language/en.po
./admin/i18n/ext/en.po
./admin/i18n/en.po

............. not what I am looking for, so instead:

vendor/aimeos/aimeos-core$ ls config/
resource.php-dist
Is resource.php-dist the configuration file?
There arent any language references in this file......

Where is the config file I need to find to override entries in .po files?

Re: How to work with Language files, .po files and overridin

Posted: 20 Apr 2016, 21:58
by aimeos
Here you can find the documentation of how to overwrite translations in Laravel:
https://aimeos.org/docs/Laravel/Overwrite_translations

Re: How to work with Language files, .po files and overridin

Posted: 21 Apr 2016, 22:41
by pbgswd
We tried the simplest option, where we added the customization to the shop.php file

Code: Select all

   'i18n' => array(
       'en>' => array(
           'client/code' => array(
               'package-weight' => array('Weight'),
           ),
       ),
   ),
... and it did nothing

in the property template:

echo $enc->html( $this->translate( 'client/code', $propertyItem->getType() ), $enc::TRUST );

Is there some reason why it did nothing? What needs to be done here?

Re: How to work with Language files, .po files and overridin

Posted: 21 Apr 2016, 23:41
by aimeos
pbgswd wrote:

Code: Select all

   'i18n' => array(
       'en>' => array(
           'client/code' => array(
               'package-weight' => array('Weight'),
           ),
       ),
   ),
Your config is wrong: 'en>' (mind the ">" char that shouldn't be there).