- Posts: 2
- Thank you received: 0
Display message is not translated.
My site is in german language. Everything is going perfect. But in the product display message of item in stock is not displaying in german. Message is displaying in english.
Please Log in or Create an account to join the conversation.
Thanks to check in the language file if the entry is present, and if it is in german.
You can see that via HikaShop Configuration > Languages.
If the entry is not present, you can add it in the override part.
hikashop.com/support/faq.html#tran
Please Log in or Create an account to join the conversation.
For English version:X_ITEMS_IN_STOCK="%s items in stock"
It still show "%s items in stock" on page even I had added override "X_ITEMS_IN_STOCK="""
For Chinese version. Translation and override didn't work also. Just show English.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I opened a page and debug language. error showed as follow:
"JROOT/language/zh-CN/zh-CN.com_hikashop.ini :error line 2108, 2110
JROOT/language/en-GB/en-GB.mod_falang.ini :error line 21 "
Please Log in or Create an account to join the conversation.
If you don't know, please copy the lines around these places here so that we can tell you.
Please Log in or Create an account to join the conversation.
So attached.
Please Log in or Create an account to join the conversation.
Could you maybe paste them on pastebin.com/ and give us a link to them once done ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
In the hikashop language file, you have the text:
Please Log in or Create an account to join the conversation.
I changed that language,and now no error tips in language debug!
But still " items in stock" was not translated in CN page
Please Log in or Create an account to join the conversation.
$text = JText::sprintf('X_ITEM_IN_STOCK',$this->row->product_quantity);
to:
$text = JText::sprintf('X_ITEMS_IN_STOCK',$this->row->product_quantity);
in the file "quantity" of the view "product" via the menu Display>Views and try again.
Please Log in or Create an account to join the conversation.
I amended the code and saved,but then it would change to original code again.
if(JText::_('X_ITEM_IN_STOCK')=='X_ITEM_IN_STOCK'){
$text = JText::sprintf('X_ITEMS_IN_STOCK',$this->row->product_quantity);
}else{
$text = JText::sprintf('X_ITEM_IN_STOCK',$this->row->product_quantity);
}
}else{
$text = JText::sprintf('X_ITEM_IN_STOCK',$this->row->product_quantity);
}
echo '<span class="hikashop_product_stock_count">'.$text.'<br/></span>';
if($config->get('button_style','normal')=='css'){
echo '<br />';
}
In translation file, the code is:
X_ITEMS_IN_STOCK="库存:%s 件"
So I wonder if Item is right or Items is right?
Please Log in or Create an account to join the conversation.
In your translation file you have both X_ITEM_IN_STOCK and X_ITEMS_IN_STOCK but you only have X_ITEMS_IN_STOCK translated. That's why you still see the english when it's X_ITEM_IN_STOCK which is used as it is not translated in chinese on your website. Translate it and you won't get the english in any case.
Please Log in or Create an account to join the conversation.
Thank you very much!
Please Log in or Create an account to join the conversation.