-
i18n/localization
Hello everyone,
i am using mysql with php...
i am working on internationalization/localization of a website, i need to convert the date which is stored in the database to the persian date, and then display the converted date in the website....... i dont know if anyone here knows the persian date............. i am doing this with first converting the system date from gregorian to julius day and then the julius day to the persian date.... but its not working correctly..........
the second thing i need to do is to sort the persian words using mysql, persian words are the same as arabic alephabets but having some special characters as well.... i used the following statement but not really working.....
select persian_word from word_table order by persian_word collate utf8_persian_ci;
i think i need to use the hexdecimal function:
while ($word_da = $result->fetchRow()) {
$q_right="select hex(right(persian_word, 1)) from word_table";
$right_result= $connection->query($q_right);
if ($right_result>=0x622 & $right_result<=0x6cc) {
echo "<tr><td>".$word_da[0]."</td><td>".$word_da[1]."</td></tr>\n";
}
}
note:
0x622 : the hex code for our first alephabet
0x6cc : this is for the last alephabet
in this coding i just wanted first to seperate the persian words from other languages and just display these words not the other word.....
i wish there will be someone to help me soooooonnnnnnn......
tks...
Seema from Afghanistan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|