- Posts: 31
- Thank you received: 2
Bug with hikashop_translate()
1 year 6 days ago #369232
by Denitz
Bug with hikashop_translate() was created by Denitz
-- 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_
-- 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.
1 year 6 days ago #369233
by nicolas
Replied by nicolas on topic Bug with hikashop_translate()
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.
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.
1 year 6 days ago #369239
by Denitz
Replied by Denitz on topic Bug with hikashop_translate()
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.
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.
1 year 5 days ago #369240
by nicolas
Replied by nicolas on topic Bug with hikashop_translate()
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.051 seconds