[Lazarus] Lazarus support for Sorting is completely inadequate.

Reinier Olislagers reinierolislagers at gmail.com
Sat Dec 1 21:53:55 CET 2012


On 1-12-2012 17:47, Avishai wrote:
> The problem is that there is no way to know which sort algorithm to
> use for which language without a lot of experimenting.  It took quite
> a bit of time for me to find one that worked for Hebrew.
> 
> But more than that,  for globalization/localization the Language may
> not be known in advance.
> 
> An example:
> Your app. is Globalized/Localized for String display Language.  But
> you have a Sorted ListBox with Default Sort.  The user selects Russian
> for his language.  The app. knows the language, but the  ListBox Sort
> is wrong.
1. So you want to have a set of default (in Lazarus) or perhaps
pluggable (with units of your own) sorting routines that...

> There should be a central Sort routine that can decide which Sort
> method to use based on the Language.
2. ... apply to all GUI controls at once.

As I mentioned in the forum threads on sorting, that sounds like a very
good idea.

Regardless of the implementation of 1. I think the sort routines for the
various controls (point 2) could be centralized already... unless  there
are valid reasons for that.

I would suggest to create 2 separate bug reports covering point 1 and 2..
> 
> I'm asking for help to achieve this.  I have no idea what sort methods
> to use for non-Latin languages.  Russian, Croatian, Greek...  Once
> completed and tested, it could be made a part of Lazarus, or at the
> very least, some guide could be available to help others.
So finally, you'd like
3. ready made sorting for item 1 for various languages.
Once again, seems quite sensible not to have to reinvent the wheel all
the time.
Presumably sorting order etc could be derived from how other databases
sort (e.g. the Firebird or PostgreSQL databases).

Seems like a candidate for another bug report.

Regards,
Reinier




More information about the Lazarus mailing list