withnail Posted April 25, 2005 Share Posted April 25, 2005 (edited) I have an extension for firefox called Dictionary search which allows you to highlight a word and look it up in a dictionary, currently set to the English dictionary http://dictionary.reference.com/search?q=$. I would like to add to it two Thai Language dictionaries namely www.thai2english.com and www.thai-language.com and in options there are settings to do this however I don't know exactly what URL to enter to get it working. More information on the plugin can be found here http://dictionarysearch.mozdev.org/ Please could someone help me out with this. Thanks, Withnail P.S. I would also like to change my currently dictionary setting to a British English one however the link they give to the Cambridge site doesn't work. Edited April 25, 2005 by withnail Link to comment Share on other sites More sharing options...
RDN Posted April 25, 2005 Share Posted April 25, 2005 (edited) I have an extension for firefox called Dictionary search which allows you to highlight a word and look it up in a dictionary, currently set to the English dictionary http://dictionary.reference.com/search?q=$.I would like to add to it two Thai Language dictionaries namely www.thai2english.com and www.thai-language.com and in options there are settings to do this however I don't know exactly what URL to enter to get it working. More information on the plugin can be found here http://dictionarysearch.mozdev.org/ Please could someone help me out with this. Thanks, Withnail P.S. I would also like to change my currently dictionary setting to a British English one however the link they give to the Cambridge site doesn't work. <{POST_SNAPBACK}> DictionarySearch was one of my favourite extensions, and I joined the DictionarySearch mailing list to discuss it. It is amazing how many people want more than 5 dictionaries - including myself - and the author, Jaap Haitsma, said he may do it if he gets the time. BUT, there are other similar extensions. One that is based on DictionarySearch is KnowledgeFractal by Trishank Karthik, which gives you 10 dictionaries, although 5 must search within the site you are browsing, so it really only gives you 5 more. HOWEVER, by far the best extension is Conquery and I do recommend you to give it a try. It is really easy to copy the plugins that other people have written to tailor them for your own search engines. This kind of plugin is written as plain text and is given the file extension ".cqr". I have written many such plugins and my current search list looks like this: I have not found the limit to the number of entries you can have! Back to your original question... After I have done a search at a particular web site, I look at the URL with the search results. Usually, the URL contains the item that I searched for, so it is then just a case of writing a search plugin with the correct syntax for that web site, and substituting "[:selection]" for the search item: # longdo.cqr# by RDN # <SEARCH name="Longdo Thai<>English" description="Search Longdo" action="http://longdo.ex.nii.ac.jp/?search=[:selection]&submit=Search" > </search> However, and this is the bad part, some web sites just don't cater for this kind of operation, and the URL presented after the search is done, does not contain the selected text. So, for those, I just copy the selected text and then use the same extension to get to the web site, but have to paste the text into the web site's search box. Thai-language.com is such a site. Also, so is Thai2English.com when translating from Thai, but it works OK with this plugin when translating from English to Thai: <SEARCH name="English 2 Thai" description="Search Thai2English" action="http:///www.thai2english.com/search/[:selection]" > </search> So, please give Conquery a try and, if you want, I can email all my searchplugins to you. Edited April 25, 2005 by RDN Link to comment Share on other sites More sharing options...
withnail Posted April 25, 2005 Author Share Posted April 25, 2005 (edited) Are you saying that with dictionary search I can't add Thai2English or Thai-Language.com? If so then I will definately try Conquery Thanks for your detailed reply Withnail Edited April 25, 2005 by withnail Link to comment Share on other sites More sharing options...
mike_l Posted April 25, 2005 Share Posted April 25, 2005 (edited) Also, so is Thai2English.com when translating from Thai, but it works OK with this plugin when translating from English to Thai:<SEARCH name="English 2 Thai" description="Search Thai2English" action="http:///www.thai2english.com/search/[:selection]" > </search> So, please give Conquery a try and, if you want, I can email all my searchplugins to you. <{POST_SNAPBACK}> If you put the action to "http://www.thai2english.com/?s=[:selection]" it should work ok with either Thai or English words. Edited April 25, 2005 by mike_l Link to comment Share on other sites More sharing options...
RDN Posted April 25, 2005 Share Posted April 25, 2005 Are you saying that with dictionary search I can't add Thai2English or Thai-Language.com?If so then I will definately try Conquery Thanks for your detailed reply Withnail <{POST_SNAPBACK}> No, what I mean is that both Thai2English and Thai-Language.com didn't have a URL into which you can insert the word you want translated. But "Conquery" is much more powerful and gives you many more "search engines" than "DictionarySearch". If you put the action to "http://www.thai2english.com/?s=[:selection]" it should work ok with either Thai or English words. <{POST_SNAPBACK}> I was hoping you'd reply, mike . I still can't get it to work, but I think the problem may be due to the way I have "encoding" set up on my PC / Firefox browser. If I use your suggested URL ("http://www.thai2english.com/?s=[:selection]"), I get errors. For example, ma (come, มา) gives this URL: h t t p : //www.thai2english.com/?cantFind=4Lih4Liy ...and displays this on the page: So, have you tried this on Firefox, mike? Or can you tell me how your encoding is set-up? I have tried both Western (ISO 8859-1) and Thai (Windows-874). My Regional Options are set to English (United Kingdom) and my Internet Properties/Languages are set to English (United Kingdom). Any help gratefully received! Link to comment Share on other sites More sharing options...
withnail Posted April 25, 2005 Author Share Posted April 25, 2005 can't get any of the Thai translation plugins to work using Conquery Link to comment Share on other sites More sharing options...
RDN Posted April 25, 2005 Share Posted April 25, 2005 can't get any of the Thai translation plugins to work using Conquery <{POST_SNAPBACK}> Can you try the "Longdo" one, after selecting a Thai word, eg มา Halfway down the page you should see "English-Thai: NECTEC's Lexitron-2 Dictionary [with local updates]", with a translation. Also, the "English 2 Thai" should work with English words being translated into Thai. Can you let me know what happens? Link to comment Share on other sites More sharing options...
mike_l Posted April 26, 2005 Share Posted April 26, 2005 So, have you tried this on Firefox, mike? Or can you tell me how your encoding is set-up? I have tried both Western (ISO 8859-1) and Thai (Windows-874).My Regional Options are set to English (United Kingdom) and my Internet Properties/Languages are set to English (United Kingdom). Hi RDN, yes I've tried on Firefox and it works ok for me. I've made some changes to it to try and get round the encoding problem that was happening to you though - can you try it again and see if it works any better now ? Thanks Link to comment Share on other sites More sharing options...
RDN Posted April 26, 2005 Share Posted April 26, 2005 Hi RDN, yes I've tried on Firefox and it works ok for me. I've made some changes to it to try and get round the encoding problem that was happening to you though - can you try it again and see if it works any better now ? Thanks <{POST_SNAPBACK}> Ah! That's better! Thanks very much indeed. Now it seems to work on many words. Can you report what you did (just so I can help any other sites that have the same sort of problems)? I did try it on one of the words in a recent thread, and the report generated was a little screwed up . It was this word: แหวกแนว - innovative - and it was the pronunciation guide that got screwed. (Do you want me to PM you any other problems I find? I hope you don't live to regret it ). I'll send my modified Conquery file to Withnail so he can give it a try too. Thanks again, mike_l. Link to comment Share on other sites More sharing options...
withnail Posted April 26, 2005 Author Share Posted April 26, 2005 (edited) Actually the Longdo one did work yesterday the English 2 Thai one worked just now but I'm sure it didn't yesterday. Please email me whatever RDN cheers. Edited April 26, 2005 by withnail Link to comment Share on other sites More sharing options...
withnail Posted April 26, 2005 Author Share Posted April 26, 2005 excellent RDN works well Now is there a way to get the thai2english paragraph translation to work as well? Also thai-language still not working. Link to comment Share on other sites More sharing options...
RDN Posted April 26, 2005 Share Posted April 26, 2005 (edited) Now is there a way to get the thai2english paragraph translation to work as well? Also thai-language still not working.<{POST_SNAPBACK}> Glad its starting to work OK! And I'm still looking into thai-language . (I wonder if the author is a member? ) As for the "sentence translation", I think we need to look hard at mike_l for that! It certainly used to work, and would give you the option of breaking the string of Thai words into individual words, and then you could translate each one. So what's happening mike? Have you some new plan to enhance this feature - because it really was good - or are you ditching it forever ? Edit: Oops - I just figured out how to do the translatioon of sentences... the little arrow that has appeared in the new format does the trick. Sorry, mike. So the only thing left is how to pass more than one word to the web site to translate. Any clues, mike? Edited April 26, 2005 by RDN Link to comment Share on other sites More sharing options...
withnail Posted April 26, 2005 Author Share Posted April 26, 2005 Whilst we're on the subject Mike, I love your site (as I'm sure you can tell by all of the free promoting I do for you here) however is it just me or has the size of the Thai script suddenly got really small when you're translating an entire sentance? Link to comment Share on other sites More sharing options...
mike_l Posted April 26, 2005 Share Posted April 26, 2005 Ah! That's better! Thanks very much indeed. Now it seems to work on many words. Can you report what you did (just so I can help any other sites that have the same sort of problems)?That's great, though I'm a bit unsure if it works on all words as I can't test it myself. Can you let me know if there's problems with it ? As to what I did, well it seemed to be converting the Thai text from Windows-874 encoding to UTF8 (Unicode) and so I changed it to try and detect if the word is in UTF8 and if so convert it back. I did try it on one of the words in a recent thread, and the report generated was a little screwed up . It was this word: แหวกแนว - innovative - and it was the pronunciation guide that got screwed. Thanks, that's fixed now. (Do you want me to PM you any other problems I find? I hope you don't live to regret it ).Yep, please do if and when you come across something. I'm sure there's quite a few still out there! As for the "sentence translation", I think we need to look hard at mike_l for that! It certainly used to work, and would give you the option of breaking the string of Thai words into individual words, and then you could translate each one.So what's happening mike? Have you some new plan to enhance this feature - because it really was good - or are you ditching it forever ? Edit: Oops - I just figured out how to do the translatioon of sentences... the little arrow that has appeared in the new format does the trick. Sorry, mike. Well it's pretty much the same as it always been really, the arrow is a new addition though to let you look up all the words on a line at once instead of individually. As far as I can see, the only thing missing now that used to be there are the options to remove the tonemarks and to remove spaces between words. They kind of stopped working while I was rewriting much of the code, but they'll be back once I get round to fixing it. Otherwise though, I don't intend to remove anything and have actually got a few ideas of other things to add in addition. So the only thing left is how to pass more than one word to the web site to translate. Any clues, mike?Hmmm...it's not really setup for that at the moment I guess, but I will have a look and try to make it possible. I'll post back here if/when it's done. Part of the problem is that URL's have a limit on how long they can be, so passing whole paragraphs in a URL may not be possible. Whilst we're on the subject Mike, I love your site (as I'm sure you can tell by all of the free promoting I do for you here) however is it just me or has the size of the Thai script suddenly got really small when you're translating an entire sentance? It seems like that to me too, not sure why that happened but I've made it a more reasonable size now. Thanks for the promoting BTW Link to comment Share on other sites More sharing options...
RDN Posted April 27, 2005 Share Posted April 27, 2005 Thanks for everything Mike - it's really appreciated. Link to comment Share on other sites More sharing options...
withnail Posted April 27, 2005 Author Share Posted April 27, 2005 Maybe it's just me but I still find the text very small and difficult to read, thinking about it I can't remember the size that it used to be and I'm not suggesting that you change it simply for my benefit. Could somebody just check and see if they agree with me. Link to comment Share on other sites More sharing options...
mike_l Posted April 27, 2005 Share Posted April 27, 2005 Maybe it's just me but I still find the text very small and difficult to read, thinking about it I can't remember the size that it used to be and I'm not suggesting that you change it simply for my benefit. Could somebody just check and see if they agree with me. It's set at being size 16 (larger than it used to be), and this is what it looks like to me: Is that the same size text as you're seeing ? If not, maybe you've got a cached version of the stylesheet - pressing Ctrl + F5 should force it to refresh. I could make the text even larger than that, but it seems to me it's already larger than the Thai script on most sites. Maybe having an option where you can manually set the size is the best way to go. Link to comment Share on other sites More sharing options...
withnail Posted April 27, 2005 Author Share Posted April 27, 2005 (edited) No that definately isn't the size I can see. I'm not sure the best way to include a print screen image in my post but if I copy and paste from your site it comes out this size although I understand this might not be accurate. ฉัน ชื่อณัฐ วรรณ ชื่อเล่น ชื่อ โบว์ ฉัน อายุ 12 ปี วันเกิด ของ ฉัน คือ วันที่ 29 มิถุนายน ฉัน สูง 147.5 ซ. ม. ฉัน หนัก 43 กก chăn chêu-nat wan chêu lên chêu boh chăn aa-yóo 12 bpee wan gèrt kŏng chăn kéu wan têe 29 mí-tòo-naa-yon chăn sŏong 147.5 s. m. chăn nàk 43 gòk Edited April 27, 2005 by withnail Link to comment Share on other sites More sharing options...
withnail Posted April 27, 2005 Author Share Posted April 27, 2005 Looking at my above post the Thai text is actually clearer than it's appearing for me on your site. Its about the same size I think but certainly the above is easier to read. Link to comment Share on other sites More sharing options...
RDN Posted April 27, 2005 Share Posted April 27, 2005 Sorry about the size of this post , but I thought it would help sort out the problem. The first picture is the page viewed in IE, the second is viewed in Firefox. IE: Firefox: So it's looking like a Firefox "problem". I'm going to have a look at what settings can be tweaked to improve the visibility of the Thai font. Link to comment Share on other sites More sharing options...
RDN Posted April 27, 2005 Share Posted April 27, 2005 OK, I think I've found it . Go to Tools / Options / General / Fonts & Colours / Change "Fonts for:" to read "Thai". Change "Sans-serif:" to "Tahoma". That's it! Withnail, can you try it? Link to comment Share on other sites More sharing options...
withnail Posted April 29, 2005 Author Share Posted April 29, 2005 yeah that seems to have fixed it cheers Link to comment Share on other sites More sharing options...
RDN Posted April 29, 2005 Share Posted April 29, 2005 Moved this thread to Thai Language forum. Link to comment Share on other sites More sharing options...
withnail Posted April 29, 2005 Author Share Posted April 29, 2005 Did you ever work out how to stop the encoding from changing back to western? Link to comment Share on other sites More sharing options...
RDN Posted April 29, 2005 Share Posted April 29, 2005 Did you ever work out how to stop the encoding from changing back to western? <{POST_SNAPBACK}> No, I'm afraid not! (Not yet, anyway - I'll keep looking into it and let you know if/when I get success). But excellent news on the thai-language.com front: I've been talking to the author of the site for the last few days and he has modified the site to deal with the encoding problems -- the same problems that thai2english.com had, I guess. I won't go into the details here, but suffice to say if you change the Conquery ".cqr" file for thai-language.com as shown below, it will work: Just add "_utf8" to the "action" line, as shown: <SEARCH name="Thai-language.com" description="Thai-language.com Thai<>English" action="http://www.thai-language.com/default.aspx?search_utf8=[:selection]" > </search> His site also gives excellent examples of words and phrases, and downloadable sound clips, too. Link to comment Share on other sites More sharing options...
Richard W Posted April 30, 2005 Share Posted April 30, 2005 Just add "_utf8" to the "action" line, as shown:<SEARCH name="Thai-language.com" description="Thai-language.com Thai<>English" action="http://www.thai-language.com/default.aspx?search_utf8=[:selection]" > </search> <{POST_SNAPBACK}> Strange, I can't get it to fail with 'search' rather than 'search_utf8'! 'search_utf8' does fail for me from a file with Thai encoding. I'm using Firefox 1.0.3, if that makes any difference. I had been going to suggest just adding: queryCharset="TIS-620" but I can't find any evidence that it's broke! Maybe the plu-ins been fixed, but that seems a long shot. I'm using ConQuery 1.5.3. (cced to Glen Slayden) Link to comment Share on other sites More sharing options...
withnail Posted April 30, 2005 Author Share Posted April 30, 2005 Thanks RDN however this is only for Thai > English what about English > Thai? Link to comment Share on other sites More sharing options...
RDN Posted April 30, 2005 Share Posted April 30, 2005 Thanks RDN however this is only for Thai > English what about English > Thai? <{POST_SNAPBACK}> Yes, same problem for me. So I've simply duplicated - copied - the "thailanguage.cqr" and "thailanguage.png" files and called them "thailanguage2.cqr" and "thailanguage2.png". Inside the "thailanguage2.cqr" file, I've changed the "action=" line by removing the "_utf8". So this one works with English to Thai, and the other with Thai to English. I've also changed the "name=" lines to indicate "T>E" and "E>T", which is what you see on the Conquery menu, so you know which one to click depending on which way you want the translation to work. I can send all 4 files to you if you want. Link to comment Share on other sites More sharing options...
RDN Posted April 30, 2005 Share Posted April 30, 2005 Just add "_utf8" to the "action" line, as shown:<SEARCH name="Thai-language.com" description="Thai-language.com Thai<>English" action="http://www.thai-language.com/default.aspx?search_utf8=[:selection]" > </search> <{POST_SNAPBACK}> Strange, I can't get it to fail with 'search' rather than 'search_utf8'! 'search_utf8' does fail for me from a file with Thai encoding. I'm using Firefox 1.0.3, if that makes any difference. I had been going to suggest just adding: queryCharset="TIS-620" but I can't find any evidence that it's broke! Maybe the plug-ins been fixed, but that seems a long shot. I'm using ConQuery 1.5.3. (cced to Glen Slayden) <{POST_SNAPBACK}> Very strange about it not failing for you. It must be something to do with Firefox setup. Can you give me a URL with a specific Thai word on it that works with the "search=" version of the plugin? Then I can try the same word on my PC - it may give us a clue as to what is going on. By the way, I'm still on FF 1.0.2. I did try 1.0.3 but it totally screwed up my "tabbrowser extensions" extension (which is notoriously "flaky") so I went back to 1.0.2. And my Conquery plugin is v1.5.2. So I'll change that and tell you what happens! Regarding "queryCharset="TIS-620"", I've seen that keyword (?) in other ConQuery plugins, but I don't know enough about this language to do anything with it. I can certainly play around with it and see what happens - any advice gratefully received. Link to comment Share on other sites More sharing options...
Richard W Posted April 30, 2005 Share Posted April 30, 2005 ... but I can't find any evidence that it's broke! Maybe the plug-ins been fixed, but that seems a long shot. I'm using ConQuery 1.5.3. <{POST_SNAPBACK}> Very strange about it not failing for you. It must be something to do with Firefox setup. Can you give me a URL with a specific Thai word on it that works with the "search=" version of the plugin? It works on the อก part of เอกชัย in the 'My Name in Thai?' topic here. For a definite UTF-8 example, I've created a UTF-8 version of my exposition of the Alphabetic Sorting of Thai. The plug-in works for most of the words in the latter, or all if you count reports of words not being in the dictionary. It's possible that the failures are dependent on all the characters of the word having TIS-620 codes of the form Cx and Dx (Unicode 0E2x and 0E3x) - which means some carefully drafted testcases would be required! (My calculations could be wrong - converting TIS-620 to UTF-8 in one's head is tricky!) Regarding "queryCharset="TIS-620"", I've seen that keyword (?) in other ConQuery plugins, but I don't know enough about this language to do anything with it. I can certainly play around with it and see what happens - any advice gratefully received. <{POST_SNAPBACK}> You put it in the search 'tag', just like the name, description and action. Of course, the URI for the search action might behave differently with other browsers! Incidentally, for unaccented English, the 'search' and 'search_utf8' value specifiers should have exactly the same effect for thai-language.com; ASCII is a strict subset of both UTF-8 and TIS-620 - the latter two differ in the interpretation of bytes with the high bit set. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now