Collation for multilanguage site

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
philmills
User
Posts: 535

Collation for multilanguage site

Post by philmills »

My table collations are set to utf8mb4_unicode_ci throughout, as I understood this to currently be the most universally compatible.
But for some languages this doesn't produce the correct data sorting.
I have read that for MySQL the collation can be set during database connection.
I expected to find a collation setting in the language file but I didn't see one.

Do I have to accept incorrect data sorting, or does PHPmaker have a way for me to define the collation for each language?


arbei
User
Posts: 9288

Post by arbei »

You can only set your collation in your database.


philmills
User
Posts: 535

Post by philmills »

In that case, since php_intl extension is already required for PHPMaker, couldn't locale based collation be handled using php_intl collator class ?
https://www.php.net/manual/en/class.collator.php

Best would be to have "Preferred data collation" added to Locale settings


arbei
User
Posts: 9288

Post by arbei »

Record sorting in List pages is done by database, not by PHP.


philmills
User
Posts: 535

Post by philmills »

Yes I know. but I'm suggesting that for multilanguage sites the sorting should be handled in PHP instead.
Otherwise the sorting is incorrect according to language standards


Post Reply