Bug with hikashop_translate()

  • Posts: 21
  • Thank you received: 1
1 day 11 hours ago #369232

-- HikaShop version -- : 6.1.0
-- Joomla version -- : 6.0.0
-- PHP version -- : 8.3

Hikashop always translates product names.
I have a product with both Cyrillic and English chars (that's how it's required):
"Крем корректирующий Азеline (Азелайн)"

See that it contains English chars "line", all other are Cyrillic.

The problem is that function hikashop_translate() strips all non-English chars and translates it using weird simple LINE key which exists in Hikashop translation file.

Please either don't strip the non-language chars via "$val = preg_replace('#[^A-Z_0-9]#','',strtoupper($o));"
or rename all simple keys in language files, the keys like LINE, COLUMN, should not exists.
In normal Joomla component all language keys should have the component-specific prefix: COM_HIKASHOP_

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

  • Posts: 84638
  • Thank you received: 13765
  • MODERATOR
1 day 8 hours ago #369233

Hi,

You can turn on the "Non-latin translation keys" setting of the HikaShop configuration:
www.hikashop.com/support/documentation/5...onfig.html#languages
This way, instead of using the latin letters of the name as key for the translation, it will use a hash of all the characters and prefix it. This will prevent overlap with other translation keys.

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

  • Posts: 21
  • Thank you received: 1
20 hours 41 minutes ago #369239

Setting "Support translated aliases in URLs" is only visible when "Activate the edition of content in multiple languages" is enabled.
I don't need edition in multiple languages.

So, you need to enable "Activate the edition of content in multiple languages", click Save, enable "Support translated aliases in URLs" and disable "Activate the edition of content in multiple languages", click Save.

Thanks for idea, at least it works, though looks frustrating for the end user:
"Support translated aliases in URLs" setting should be always visible, even if "Activate the edition of content in multiple languages" is disabled.

The following user(s) said Thank You: nicolas

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

  • Posts: 84638
  • Thank you received: 13765
  • MODERATOR
16 hours 15 minutes ago #369240

Thank you for your feedback on this. We'll look into it.

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

Time to create page: 0.062 seconds
Powered by Kunena Forum