Member
Member
Wahyaohni   2010-07-09, 16:31
#1

Hello, my tattoo site is using dynamic locale for czech and international visitors. I'm having album directories in english and so in english "version" they are sorted correctly (like "american, ankle, back, celtic .. etc.), but switched to czech, the sorting looks like .. kind of "completely unsorted" ;-)

I'm wondering if there's a way how to sort albums custom by language. It doesn't need to rely on dynamic locale, just the different locale, as I'm thinking now.

Any ideas please?

As I do research, it could be somehow done by selecting TITLE from albums SQL table, as follows example: "a:3:{s:5:"cs_CZ";s:6:"anděl";s:5:"en_US";s:5:"angel";s:5:"nl_NL";s:5:"engel";}"

but before I start coding my "patch", as I'm not very skilled coder, isn't there any other solution?

Many thanks
Filip

Administrator
Administrator
acrylian   2010-07-09, 16:48
#2

You can sort by title. I suggest you try the current release first before trying anything since you are using 1.2.8.

If you think sorting does not work correctly with 1.3 as well please open a ticket.

Besides if you are using the multilingual you can't sort by a query using the title field as that is serialized (as you posted).

Member
Member
Wahyaohni   2010-07-09, 19:11
#3

Wow, it's working now. I found the menu option and had it set right. The confusion was made probably by czech translation where one was "name" and second was "title". This is great, it makes the gallery much more clean, sorted now ;-)

Anyway I'm having another issue to solve now - it put's diacritical beginning characters in front of all instead of where it belongs.

But I understand this is regional issue. Anyway any idea how to solve it by hardrecoding somewhere?

Thanks
ps: I'm going to upgrade to 1.3 asap, just have to make some backups and testing, etc.

Member
Member
sbillard   2010-07-10, 00:35
#4

There are some issues with sorting strings with some diacritical characters. I am afraid we do not yet know of a solution to the issue. Seems not to be a sort that does both "natural" order and handles diacritical characters.

Member
Member
Wahyaohni   2010-07-10, 12:13
#5

I'll try to do some research about this, as in my language this must have been solved elsewhere for sure. To make it easier for me, can you point me to the section of code (which file?) where this sorting is being done?

Member
Member
sbillard   2010-07-10, 17:03
#6

There is a function named sortByMultilingual() in functions.php which is used for the title sorts. However, there are other places where this solution would be needed--for instance, sorting the Tags. There is a parameter for normal sorts, SORT_LOCALE_STRING that handles this, but with these sorts, numbers are not sorted the way people expect. (Orders end up like 1,10,2,3...)

Member
Member
Wahyaohni   2010-07-10, 17:43
#7

Ok, I'll try to do some research and local consultations about this.

Member
Member
Wahyaohni   2010-07-11, 22:15
#8

Good news everyone. Solved ;-)

This function used after natcasesort on $temp make it right for czech language. Unfortunately this is language specific.

btw. in my case I had to alter one of the last lines to while ($charA !=); (which makes this part of code disabled kind of) because it gave me some error I could'nt solve but make this work at all.

As for the comments if you need, put it into google translate and you should be fine.

Member
Member
Wahyaohni   2010-07-16, 20:32
#9

So, how do you feel about this? Is it any help for development or just "patch" for czech language to work? (any reply to let me know pls)

Member
Member
sbillard   2010-07-17, 00:32
#10

Well, since this is language specific, it is not something that we will incorporate. we would really like a general solution, but so far, none has surfaced.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.