[SOLVED] Thai lang. with the autosuggest field

Talk about Multi-Language tricks, problems, errors etc.

Moderators: ne_moj, zewa, vadimako, ne_moj, zewa, vadimako

yudthaphon
Junior
Junior
Posts: 24
Joined: Nov 2nd, '09, 14:29

[SOLVED] Thai lang. with the autosuggest field

Postby yudthaphon » Mar 16th, '11, 04:00

hello
I am very happy with my datagrid 6.4.1. I have a question for you.
When I try the modules/autosuggest/test.php with some
extra-row in Thai language name added into to current $aUsers array,
the English name works fine with auto-suggest (it pops up).
However, the auto-suggest does not show anything when I starts typing a Thai character.
I use everything in UTF-8 (MySQL/PHP).

Would you please suggest a solution?

Thank you very much.

yudthaphon
Last edited by yudthaphon on Apr 8th, '11, 02:43, edited 1 time in total.

administrator
Site Admin
Site Admin
Posts: 5987
Joined: Jan 7th, '09, 23:18
Contact:

Re: Thai lang. with the autosuggest field

Postby administrator » Mar 16th, '11, 11:54

You have to debug this problem to understand what happens.
1. Try to change in datagrid.class.php json=true on json=false and json:true on json:false
2. Try also to add your autosugest file:
header("Content-Type: text/html; charset=utf-8");

yudthaphon
Junior
Junior
Posts: 24
Joined: Nov 2nd, '09, 14:29

Re: Thai lang. with the autosuggest field

Postby yudthaphon » Mar 17th, '11, 02:32

I fix it by change the line

if (strtolower(substr(utf8_decode($aUsers[$i]),0,$len)) == $input)
to
if (strtolower(substr($aUsers[$i],0,$len)) == $input)

and now it works!
result03.JPG
result03.JPG (7.09 KiB) Viewed 1715 times


I also would like to ask you how to modify that code that
it shows "No result!" if it does not find any matched result (As in the demo page)
since the current code does not show it now.

Thank you very much for your respond.

yudthaphon

administrator
Site Admin
Site Admin
Posts: 5987
Joined: Jan 7th, '09, 23:18
Contact:

Re: Thai lang. with the autosuggest field

Postby administrator » Mar 17th, '11, 10:23

Set "shownoresults"=>"false" in definition of this field


Return to “Multi-Language implementation”