[Skip to main content](#vessel-content)

#   Bug with hikashop\_translate()

##

- **[Denitz](/forum/user/42054-denitz "View Denitz's Profile")**
- [![Denitz's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/42054-denitz "View Denitz's Profile") Topic Author
- [ Offline](/forum/user/42054-denitz)

Less More

- Posts: 31
- Thank you received: 2
-
-

1 year 6 days ago [\#369232](#369232) by [Denitz](/forum/user/42054-denitz "View Denitz's Profile")  *[Bug with hikashop\_translate()](/forum/25-install-update/909864-bug-with-hikashop-translate#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): &quot;Крем корректирующий Азеline (Азелайн)&quot;  See that it contains English chars &quot;line&quot;, all other are Cyrillic.  The problem is that function hikashop&#95;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 &quot;$val = preg&#95;replace('#&#91;^A-Z&#95;0-9&#93;#','',strtoupper($o));&quot; 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&#95;HIKASHOP&#95;")* was created by *[Denitz](/forum/user/42054-denitz "View Denitz's Profile")*

-- 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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwOTg2NC1idWctd2l0aC1oaWthc2hvcC10cmFuc2xhdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86363
- Thank you received: 14296
-
-

1 year 6 days ago [\#369233](#369233) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bug with hikashop\_translate()](/forum/25-install-update/909864-bug-with-hikashop-translate#369233 "-- 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): &quot;Крем корректирующий Азеline (Азелайн)&quot;  See that it contains English chars &quot;line&quot;, all other are Cyrillic.  The problem is that function hikashop&#95;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 &quot;$val = preg&#95;replace('#&#91;^A-Z&#95;0-9&#93;#','',strtoupper($o));&quot; 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&#95;HIKASHOP&#95;")*

Hi,

You can turn on the "Non-latin translation keys" setting of the HikaShop configuration:
[ www.hikashop.com/support/documentation/5...onfig.html#languages](https://www.hikashop.com/support/documentation/54-hikashop-config.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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwOTg2NC1idWctd2l0aC1oaWthc2hvcC10cmFuc2xhdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Denitz](/forum/user/42054-denitz "View Denitz's Profile")**
- [![Denitz's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/42054-denitz "View Denitz's Profile") Topic Author
- [ Offline](/forum/user/42054-denitz)

Less More

- Posts: 31
- Thank you received: 2
-
-

1 year 6 days ago [\#369239](#369239) by [Denitz](/forum/user/42054-denitz "View Denitz's Profile")  Replied by *[Denitz](/forum/user/42054-denitz "View Denitz's Profile")* on topic *[Bug with hikashop\_translate()](/forum/25-install-update/909864-bug-with-hikashop-translate#369239 "-- 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): &quot;Крем корректирующий Азеline (Азелайн)&quot;  See that it contains English chars &quot;line&quot;, all other are Cyrillic.  The problem is that function hikashop&#95;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 &quot;$val = preg&#95;replace('#&#91;^A-Z&#95;0-9&#93;#','',strtoupper($o));&quot; 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&#95;HIKASHOP&#95;")*

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](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwOTg2NC1idWctd2l0aC1oaWthc2hvcC10cmFuc2xhdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86363
- Thank you received: 14296
-
-

1 year 5 days ago [\#369240](#369240) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bug with hikashop\_translate()](/forum/25-install-update/909864-bug-with-hikashop-translate#369240 "-- 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): &quot;Крем корректирующий Азеline (Азелайн)&quot;  See that it contains English chars &quot;line&quot;, all other are Cyrillic.  The problem is that function hikashop&#95;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 &quot;$val = preg&#95;replace('#&#91;^A-Z&#95;0-9&#93;#','',strtoupper($o));&quot; 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&#95;HIKASHOP&#95;")*

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwOTg2NC1idWctd2l0aC1oaWthc2hvcC10cmFuc2xhdGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.061 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
