Page 1 of 1
Collation for multilanguage site
Posted: Thu Jan 26, 2023 1:34 am
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?
Re: Collation for multilanguage site
Posted: Thu Jan 26, 2023 10:44 am
by arbei
You can only set your collation in your database.
Re: Collation for multilanguage site
Posted: Thu Jan 26, 2023 4:57 pm
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
Re: Collation for multilanguage site
Posted: Thu Jan 26, 2023 6:56 pm
by arbei
Record sorting in List pages is done by database, not by PHP.
Re: Collation for multilanguage site
Posted: Fri Jan 27, 2023 7:26 pm
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