Jump to content

Sorting categories on a multilanguage website


Recommended Posts

Hello,

I am using Presta 1.4.1 and a few languages.
I have noticed the following problem - even when I choose a different language to view the site in, the categories still sort according to their English names, not to the names that I have translated for that language. For example, [en] Albanian is [pl] albański, so no problem but [en] English is translated in [pl] as angielski. So when I change the site to Polish I would like the English category to appear at the top of the list (since angielski stars with a letter "a") but it is not sorted that way. Is there a way to change it? It seems a very basic necessity to sort categories depending on a language. Thank you!

Zbigniew Szalbot

Link to comment
Share on other sites

Actually, I have modified an sql query inside modules/blockcategories/blockcategories.php
from

ORDER BY `level_depth` ASC, c.`position` ASC')


into

ORDER BY `level_depth` ASC, cl.`name` ASC')



Sorting is now correct but this does not solve the real problem. I hate touching sources as this means issues while updating. Any better fix, please?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...