View Full Version : chinese support
taoqcom
01-13-2006, 08:14 PM
I bought the GAL today and tried it out on my site. However, I found that it doesn't support Chinese at all.
Is there anything you can do? If not, can I get my money back?
Thanks,
Jeff
Lizard King
01-13-2006, 10:45 PM
Gal is designed to work with multiple languages . Can you paste what error you are receiving ?
taoqcom
01-14-2006, 01:51 AM
Gal is designed to work with multiple languages . Can you paste what error you are receiving ?
no error message. However, the word I specified won't be converted into a link. I am using the UTF-8 for the chinese character encoding.
I checked the gal_class_admin.php and found that "/u" is not used in the regular expression.
I changed the following statement in line 562
$texts= '/' . '' . '\b(' . $leadingchar.$text_regex . ')s?\b/uim';
However, it still doesn't work. Not sure whether I wrote the regular expression correctly. Can you help?
Thanks,
Jeff
taoqcom
01-14-2006, 01:29 PM
any help? I want to get this resolved this weekend. Appreciate any help.
The Geek
01-14-2006, 03:16 PM
Im not sure what the /u flag is for to be honest. No one else has had any other problems with any other language. Can you provide a URL with a problematic GAL on it? It could just be a setup issue.
taoqcom
01-14-2006, 07:14 PM
You can use the following link to take a look.
http://www.taoq.com/bbs/showthread.php?t=21352
I want to replace "joyo" or "卓越" with the link I preferred (used "joyo,卓越"). it worked fine for "joyo" but not for "卓越".
The /u flag is for the utf-8 encoding.
The Geek
01-14-2006, 10:42 PM
huh. I would have assumed that adding it to where you did should have worked. Did you try to debug->rebuild AFTER you made the edit?
taoqcom
01-14-2006, 11:50 PM
huh. I would have assumed that adding it to where you did should have worked. Did you try to debug->rebuild AFTER you made the edit?
I did exactly that and even spent two hours debugging it. Also searched on the internet, couldn't find any solution.
taoqcom
01-15-2006, 01:30 AM
I did exactly that and even spent two hours debugging it. Also searched on the internet, couldn't find any solution.
In gal_class_admin.php
I changed
$texts= '#(' . '' . '\b(' . $leadingchar.$text_regex . ')s?\b)#im';
to
$texts= '#(' . '' . '(' . $text_regex . '))#im';
It works now. I know the change won't work in all the cases. for the time being, I am happy about it.
Thanks,
Jeff
The Geek
01-15-2006, 09:40 AM
hehe, now I see why.
The reason was that there was no space or word boundary in your example. The reason GAL looks for a space is to prevent breaking URLs. Im not sure if that is an issue for you or not though?!? Anyway, if you would of had a space in front of the characters you were trying to match, it would have come up positive.
HTHs
taoqcom
01-16-2006, 03:55 PM
hehe, now I see why.
The reason was that there was no space or word boundary in your example. The reason GAL looks for a space is to prevent breaking URLs. Im not sure if that is an issue for you or not though?!? Anyway, if you would of had a space in front of the characters you were trying to match, it would have come up positive.
HTHs
that's right. In Chinese/Japanese/Korean, there is no space between words. I removed '/b' and it works like a charm now.
Thanks a lot for the help.
vnjporg
08-13-2008, 05:27 AM
In gal_class_admin.php
I changed
$texts= '#(' . '' . '\b(' . $leadingchar.$text_regex . ')s?\b)#im';
to
$texts= '#(' . '' . '(' . $text_regex . '))#im';
It works now. I know the change won't work in all the cases. for the time being, I am happy about it.
Thanks,
Jeff
Hello
I have edited as above but it does not work for my board using japanese utf-8
Anh help?
Thanks
Morgan
08-13-2008, 06:16 AM
Try setting a new regular expression via the GAL ACP Regular Expressions:
#(($1)(?=[^>]*<)(?![^<]*</))#im
Then go to the ACP -> GAL -> Categories and select the new regular expression in the Regexp column, and then use the GAL ACP Maintenance -> Rebuild RegExp Cache and see how it works.
vnjporg
08-13-2008, 06:29 AM
Hello
Thanks for your support! It works now. But I just try previewing it via "forum/glossary.php". The link still does not work in my thread! What should I do to make it work in my forum/thread ?
EDit:
Sorry it works now!
Thanks
Morgan
08-13-2008, 06:33 AM
Sorry, I'm not sure what you are asking. :(
Do you mean like this ---> test
Or do you mean something else?
vnjporg
08-13-2008, 06:38 AM
Sorry!
I firgured it out!Just because I was trying to view it in the forum whose id is "inore forum id"!
It is ok now!
Thanks alot
vnjporg
08-13-2008, 06:52 AM
Hello
I have mina problem again.
I have 2 words: ベトナム and ベトナム語 and when I add link for ベトナム語 the gal just links to ベトナム語
I meant it considers the later word as the first word.
Is there any way to fix this?
Morgan
08-13-2008, 03:46 PM
Is the 語 character showing in the GAL ACP for the keyword? Also check the HTML for the page using IE. Does the 語 character appear as ?? in the HTML source, or is it &something; instead? Does the 語 character have any special meaning? Is ベトナム語 full-width, half-width, or a combination?
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.