News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Drop-down menu is not sorted according to locale language

Started by tukusejssirs, October 07, 2018, 19:15:21 PM

Previous topic - Next topic

tukusejssirs

First of all, I am all new to Virtuemart, Joomla, and this forum, so be easy on me. ;p

I have set up a multilingual website on Joomla! 3.8.12 Stable and VirtueMart 3.2.14.

When the customer (on page in language other than English, let's say in Slovak) is asked to enter country of his address, there's a drop-down menu, which is searchable, but:

  • list is ordered according to Latin/English alphabet, not in the locale alphabet;
  • when one searches for a country that contains characters with diacritics (like č or í), these can be found if they enter the name with diacritics, but not without it.

As for the point 1., here as example list:

Current sorting:
Slovenská republika  // Slovak Republic
Spojené štáty        // United States
Česká republika      // Czech Republic
Írsko                // Ireland


Desired sorting:
Česká republika      // Czech Republic
Írsko                // Ireland
Slovenská republika  // Slovak Republic
Spojené štáty        // United States


As for the point 2., if one search for 'irsko', it currently outputs nothing (No results match "irsko"), but it should output Írsko (Ireland).

The question is: how can I accomplish this?

Studio 42

1 list is ordered according to Latin/English alphabet, not in the locale alphabet;
standard PHP ordering use ascii char, i think no advanced sorting is used for this list(this can be very slower)

2 when one searches for a country that contains characters with diacritics (like č or í), these can be found if they enter the name with diacritics, but not without it.
This is a general problem about the search with jquery chosen script
See for eg
https://stackoverflow.com/questions/14263579/searching-through-international-characters-with-chosen-js
https://github.com/harvesthq/chosen/issues/2821
So perhaps on using last chosen, it work better for search, but of course this can break other components in your site in some cases.
Free XML sitemap generator [url="http://shop.st42.fr/en/catalog/products/virtuemart-2-sitemap.htm"]http://shop.st42.fr/en/catalog/products/virtuemart-2-sitemap.htm[/url]  , Free Unused Image cleaner [url="http://shop.st42.fr/en/products/virtuemart-media-folder-clear.htm"]http://shop.st42.fr/en/products/virtuemart-media-folder-clear.htm[/url]
Language Switch in product & category [url="http://shop.st42.fr/en/categories-tools/multi-language-for-virtuemart.htm"]http://shop.st42.fr/en/categories-tools/multi-language-for-virtuemart.htm[/url]
More extentions [url="http://shop.st42.fr/en/"]http://shop.st42.fr/en/[/url]