sting5 Posted March 16, 2019 Share Posted March 16, 2019 My language requires different words for certain plural values for products, so I've added this line of code in CartPresenter.php: $summary_string = $products_count === 1 ? $this->translator->trans('1 item', array(), 'Shop.Theme.Checkout') : $this->translator->trans('%count% items', array('%count%' => $products_count), 'Shop.Theme.Checkout') ; <!-- new variable line --> $summary_string = $products_count === 2 ? $this->translator->trans('2 items', array(), 'Shop.Theme.Checkout') : $this->translator->trans('%count% items', array('%count%' => $products_count), 'Shop.Theme.Checkout') ; <!-- end of new variable line --> After that I wanted to translate the word "items" to correct representing word in my language, but the Translations page does not find it. Maybe i'ts possible to manually add a code into {main_dir}\app\Resources\translations\lt-LT\ShopThemeCheckout.lt-LT.xlf somehow for this to work? Link to comment Share on other sites More sharing options...
amorxoigel Posted April 9, 2019 Share Posted April 9, 2019 Did u find a solution? i got the same problem Link to comment Share on other sites More sharing options...
sting5 Posted April 10, 2019 Author Share Posted April 10, 2019 Unfortunately no - it seems that this code only works when there are 2 possible words - one plural, one singular. It does not take into account the fact that some languages may have few plural forms available, sadly. Link to comment Share on other sites More sharing options...
amorxoigel Posted April 10, 2019 Share Posted April 10, 2019 For what i read it's because prestashop doesnt look at any changes of a clasic theme so if u make any changes and put on "Shop.Theme.Checkout" is not going to find it. I tried to made it go to another theme with "Shop.MyTheme" but than i got error whenever i was trying to find the translation of this theme...weird nobody ever found a solution 😕 Link to comment Share on other sites More sharing options...
sting5 Posted May 31, 2019 Author Share Posted May 31, 2019 It is because the new translation system in Prestashop is bugged and still in testing phase. But this topic is mean to search for a solution on different plural forms integration, translation is next step of this issue... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now