Skip to main content

ending of the word

More
13 years 1 day ago #125921 by rockettboost
how to make a mini basket, changed ending of the word ?
1 item

2 items

Please Log in or Create an account to join the conversation.

More
13 years 19 hours ago - 13 years 19 hours ago #125993 by Mohamed Thelji
Replied by Mohamed Thelji on topic ending of the word
Hi,

The first can be to edit your translation file through "Hikashop->System->Configuration->Language" and change this line :
Code:
X_ITEMS_FOR_X="%s items for %s"
By :
Code:
X_ITEMS_FOR_X="%s item(s) for %s"
Else, you can :
- directly edit the "cart" file of the "product" view of your front-end template through "Hikashop->Display->Views" and change this line :
Code:
$text = JText::sprintf('X_ITEMS_FOR_X',$qty,$this->loadTemplate());
By :
Code:
if($qty > 1) $text = JText::sprintf('X_ITEMS_FOR_X',$qty,$this->loadTemplate()); else if($qty == 1) $text = JText::sprintf('X_ITEM_FOR_X',$qty,$this->loadTemplate());
- add this line through your language file :
Code:
X_ITEM_FOR_X="%s item for %s"
Last edit: 13 years 19 hours ago by Mohamed Thelji.
The following user(s) said Thank You: rockettboost

Please Log in or Create an account to join the conversation.

More
13 years 18 hours ago #125996 by rockettboost
Replied by rockettboost on topic ending of the word
i use russian language
X_ITEMS_FOR_X=" +%s товар"

товар - it's item

Please Log in or Create an account to join the conversation.

More
13 years 18 hours ago #125998 by rockettboost
Replied by rockettboost on topic ending of the word
thx - second variant is work

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #126171 by rockettboost
Replied by rockettboost on topic ending of the word
Mohamed , I need to add one more word completion, when more than 5 items .
please ^ help

1. 1 товар
2. 2-4 товара
3. 5-and more товаров

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #126176 by Mohamed Thelji
Replied by Mohamed Thelji on topic ending of the word
Ok so you'll just have to use some code like :
Code:
if($qty >= 5) $text = JText::sprintf('X_ITEMS_FOR_X',$qty,$this->loadTemplate()); if($qty > 1 && $qty < 5) $text = JText::sprintf('Y_ITEMS_FOR_Y',$qty,$this->loadTemplate()); else if($qty == 1) $text = JText::sprintf('X_ITEM_FOR_X',$qty,$this->loadTemplate());

Don't forget to add another traduction for the word : Y_ITEMS_FOR_Y
The following user(s) said Thank You: rockettboost

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #126177 by rockettboost
Replied by rockettboost on topic ending of the word
thx work

I reordered
X_ITEMS_FOR_X
and
Y_ITEMS_FOR_Y

well done

Please Log in or Create an account to join the conversation.

Time to create page: 0.209 seconds
Powered by Kunena Forum