Support forum of the software localization tool Sisulizer


.NET, Delphi, ... - Sisulizer Localization Tool Support Home

Get in contact with the makers of Sisulizer.
Our forum is open for all questions around Sisulizer from customers and prospects.
Don't hesitate to register and ask. The Sisulizer team will answer ASAP.

Search     Help Home Sisulizer Website Download
Search by username
Not logged in - Login | Register 

 Moderated by: Renate.Reinartz, Markus.Kreisel, Jaakko.Salmenius, Ilkka.Salmenius
New Topic Reply Printer Friendly
Ordering of Items - Wish list for software localization tool - Technical Support (You need to be registered at the forum to write) - .NET, Delphi, ... - Sisulizer Localization Tool Support
AuthorPost
 Posted: Thu Aug 14th, 2008 11:09 pm
PM Private Upload Quote Reply
mdunmill
Member
 

Joined: Tue Nov 13th, 2007
Location:  
Posts: 69
Status: 
Offline
Would it be possible to change the sorting of items to use a Natural/Logical sort order rather than a lexical sort order.

See StrCmpLogicalW Function http://msdn.microsoft.com/en-us/library/bb759947(VS.85).aspx

i.e. Instead of sorting in the following order

1

11

12

2
 

would sort as

1

2

11

12
The function StrCmpLogicalW also handles the mixing of characters and digits to produce a 'natural' sorting order.

e.g.

20string
2string
3string
st20ring
st2ring
st3ring
string2
string20
string3

is sorted as

2string
3string
20string
st2ring
st3ring
st20ring
string2
string3
string20

 

This would real help in being able to see ranges of strings etc. since now they can easily be spread right through the tree or list control whereas with the appropriate natural sort order they would be grouped logically.

 

Back To Top PM Private Upload Quote Reply

 Posted: Fri Aug 15th, 2008 04:38 am
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 614
Status: 
Offline
There is a problem. Right now we are using the CompareStringW function. It can be parametrized by a locale (language). It is important in many languages. In StrCmpLogicalW function there are no locale parameters.

But I will study this possibility more.



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Fri Aug 15th, 2008 04:51 am
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 614
Status: 
Offline
I can implement my own natural string comparing routine that uses CompareStringW function.

I will implement it in the near furure.



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Fri Aug 15th, 2008 05:10 am
PM Private Upload Quote Reply
mdunmill
Member
 

Joined: Tue Nov 13th, 2007
Location:  
Posts: 69
Status: 
Offline
Yeah, I was a bit worried that there may be other issues. However, I don't think the basic algorithm would be too hard to implement yourself.

I'm not 100% certain, but I think all that happens is that each string is broken up into homogeneous sections consisting of parts made entirely of digits or entirely of non-digits. The sections from 2 strings are then compared in order. If a section consists entirely of digits then a numeric comparison is done. For two non-digit sections then a straight lexical comparison is done. If a comparison between digits and non-digit sections then return the digits as coming first. Sections are compared in turn until a difference is found.

I think this approach would allow locale sorting rules to be obeyed and should be able to be implemented in Delphi etc.

One of the only issues may be the right-to-left languages, but I'm not sure.
Another issue would be the handling of arbitrary length digit strings without overflowing. (Can skip leading zeroes etc. in both strings and then return the shorter of the two strings - if the remaing digit strings are the same length then do a lexical comparison - if the strings are equal then return the one with the shortest number of leading zeroes).

(Note: numbers with decimal points, be they commas or periods, won't sort strictly numerically but that is ok - I think!?!)


 

 

Back To Top PM Private Upload Quote Reply

 Posted: Thu Aug 21st, 2008 06:30 am
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 614
Status: 
Offline
I implemented it (like you suggested). Will be in the next build.

regards
Ilkka



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

Current time is 10:19 am  
.NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Wish list for software localization tool > Ordering of Items



WowUltra modified by Sisulizer Copyright © 2007-09 by Jim Hale - Based on WowBB Copyright © 2003-2006 Aycan Gulez

Sisulizer software localization tool - Three simple steps to localize