PrestaShopCorp / yousticeresolutionsystem

Other
1 stars 3 forks source link

Translations #8

Closed gaillafr closed 10 years ago

gaillafr commented 10 years ago

PrestaShop already includes a translation system, you cannot use your own. Using your own translation system merchant will not be able to changes sentences.

devyoustice commented 10 years ago

Using your own translation system merchant will not be able to changes sentences.

prestachris commented 10 years ago

We simply want to make sure the merchant could modify any text/translation without having to edit a file directly.

A quick and simple workaround would be to add for all PHP files present in the /language_strings/ folder the following:

<?php include(dirname(FILE).'/../../yousticeresolutionsystem.php'); $y = new yousticeresolutionsystem();

and then instead of having for instance: "Would you like to file a complaint?" => "Would you like to file a complaint?",

you would simply have: "Would you like to file a complaint?" => $y->l("Would you like to file a complaint?"),

This small adjustment (only 7 chars per translation) would comply to our standards and make all your texts translatable from the PrestaShop Admin panel for every merchant.

devyoustice commented 10 years ago

The proposed change suggests using presta-specific function inside our generic SDK. Such code would not work on a different platform.

devyoustice commented 10 years ago

Check the newly pushed version, commit: f9cf09425986ed30c9b14b35627d8f8e47d5d35f or later