Multi Language Sort
I'm facing a specific sort problem.
There are several thousands of articles sold all over.
Users expect to get a description in local language sorted by their specific collation.
I have simplified the original class to the core fields for this case.
{
Property ArtNr As %Integer(MINVAL = 0) [ Required ];
/// default Description
Property Description As %String [ Required ];
/// German
Property DescDE As %String;
/// Italian
Property DescIT As %String;
/// English
Property DescEN As %String;
/// French
Property DescFR As %String;
/// Czech
Property DescCZ As %String;
/// Slovakian
Property DescSL As %String;
/// Hungarian
Property DescHU As %String;
/// Bulgarian
Property DescBG As %String;
/// Romanian
Property DescRO As %String;
/// Slovenian
Property DescSI As %String;
Index Idx On ArtNr [ IdKey ];
Index IdxDE On DescDE;
Index IdxHU On DescHU;
Index IdxDE On DescEN;
. . .
}
The whole construct serves as multi language lookup table.
It works based on the defined Indices [here only 3 for this example]
The problem to be solved is to have the correct language-specific collation
Some languages overlap nicely (eg. EN + DE) but others (esp. HU) don't match
or are totally separated (e.g. BG in Cyrillic notation)
just see example: https://en.wikipedia.org/wiki/Hungarian_alphabet
There is actually some hand-coded workaround in place to enforce collation but performance is not thrilling.
I hope you have some brilliant suggestions to get better solutions.