简体   繁体   English

如何在古吉拉特语网站的选项标签中设置升序或降序

[英]How to set ascending or descending order in gujarati website's option tag

Hello I create a website in Gujarati language. 您好,我用古吉拉特语创建了一个网站。 I want display the data of database to show in option menu in order of Gujarati Vowels and Consonants .How can I arrange it in this order? 我想在古吉拉特语元音字母的顺序显示数据库选项菜单显示的数据和辅音 。怎么能在我这个顺序安排呢?

I tried ascending and descending order but it is not work in Gujarati language. 我尝试了升序和降序,但是它在古吉拉特语中不起作用。 Here is Some Part of option tag Which i want to arrange 这是我要安排的选项标签的一部分

古吉拉特语语言下拉列表

In PHP you'll want to use a Collator from the intl extension , and I believe the locale will be gu_IN . 在PHP中,您将需要使用intl扩展中Collator ,并且我相信语言环境将是gu_IN

eg: 例如:

$c = new Collator('gu_IN');
$c->sort($myArray);

In MySQL so long as you're using a UTF8 collation your strings should sort correctly, assuming that the UTF8 codepoints for Gujarati are in the correct order. 在MySQL中,只要您使用UTF8归类,就应该正确地对字符串进行排序,前提是古吉拉特语的UTF8代码点的顺序正确。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM