Jump to content

Adding Thai Dictionary Engines To Firefox


Recommended Posts

Posted
... 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.

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.

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.

I've updated to ConQuery 1.5.3, but still can get อก to be translated only by using the "search_utf8" option.

I don't understand your comment about "the 'search' and 'search_utf8' value specifiers should have exactly the same effect for thai-language.com" - I thought the "_utf8" version was specifically added by Glenn to indicate "here comes a Thai word" and was subjected to different processing. Maybe Glenn can comment?

I wish I knew more about this stuff. I just tried changing the plugin to:

   queryEncoding="utf-8"
   queryCharset="utf-8"
   action="http://www.thai-language.com/default.aspx?search=[:selection]"

... but still it doesn't make the Thai words get translated correctly. The only thing that works for me (Thai to English) is:

   action="http://www.thai-language.com/default.aspx?search_utf8=[:selection]"

I also tried changing the "View/Character Encoding" in Firefox to both "UTF-8" and "TIS-620" before selecting the Thai word for translation, but to no avail.

If you want me to do any more tests I am quite happy to do so, but I am also happy to leave it as it is - there is a way to do the translations in both directions, even if it does mean using two slightly different plugins for thai-language.com. However, I really am keen to find out why your Firefox setup works without the "_utf8" modification.

Posted

Richard: I forgot to add that I went to that page - "a UTF-8 version of my exposition of the Alphabetic Sorting of Thai" and it did indeed get reported as "encoding UTF-8" in Firefox, but the Thai words near the end:

As an example of rule 4, we have แหง, แหง่, แห่ง, แห้ง, ... แหงน and เหม, เหม่.

...all failed to be translated using the "search=" plugin, and were successfully translated using the "search_utf8=" plugin.

Edit: ....except for the 2nd word, which is probably not in the dictionary.

Posted
I've updated to ConQuery 1.5.3,  but still can get อก to be translated only by using the "search_utf8" option.

I don't understand your comment about "the 'search' and 'search_utf8' value specifiers should have exactly the same effect for thai-language.com" -  I  thought the "_utf8" version was specifically added by Glenn to indicate "here comes a Thai word" and was subjected to different  processing. Maybe Glenn can comment?

'I had to [add] special processing because, as I discovered, certain UTF-8-encoded

words can be AMBIGUOUS with TIS-620 formatted text!' - Glenn.

The problem is that one cannot always tell whether Thai has been encoded in UTF-8 or TIS-620, but the meaning of the bytes is totally different dependent on which it is. On the other hand, by design the UTF-8 and TIS-620 encodings of unaccented English are identical with ASCII, so there shouldn't be any problem with English.

I wish I knew more about this stuff. I just tried changing the plugin to:

   queryEncoding="utf-8"
   queryCharset="utf-8"
   action="http://www.thai-language.com/default.aspx?search=[:selection]"

I'm not surprised that doesn't work. I'm pretty sure you should be specifying "tis-620" in the 'queryCharset' to go with plain 'search'.
However, I really am keen to find out why your Firefox setup works without the "_utf8" modification.

The only possible difference I can think of is that my non-Unicode programs are set to assume Thai. I've only noticed the difference in Unicode-aware (!) programs - chiefly that 'ANSI' text format means TIS-620 or similar to Notepad.

Posted
I've updated to ConQuery 1.5.3,  but still can get อก to be translated only by using the "search_utf8" option.

I don't understand your comment about "the 'search' and 'search_utf8' value specifiers should have exactly the same effect for thai-language.com" -  I  thought the "_utf8" version was specifically added by Glenn to indicate "here comes a Thai word" and was subjected to different  processing. Maybe Glenn can comment?

'I had to [add] special processing because, as I discovered, certain UTF-8-encoded

words can be AMBIGUOUS with TIS-620 formatted text!' - Glenn.

The problem is that one cannot always tell whether Thai has been encoded in UTF-8 or TIS-620, but the meaning of the bytes is totally different dependent on which it is. On the other hand, by design the UTF-8 and TIS-620 encodings of unaccented English are identical with ASCII, so there shouldn't be any problem with English.

I wish I knew more about this stuff. I just tried changing the plugin to:

   queryEncoding="utf-8"
   queryCharset="utf-8"
   action="http://www.thai-language.com/default.aspx?search=[:selection]"

I'm not surprised that doesn't work. I'm pretty sure you should be specifying "tis-620" in the 'queryCharset' to go with plain 'search'.
However, I really am keen to find out why your Firefox setup works without the "_utf8" modification.

The only possible difference I can think of is that my non-Unicode programs are set to assume Thai. I've only noticed the difference in Unicode-aware (!) programs - chiefly that 'ANSI' text format means TIS-620 or similar to Notepad.

Well, I tried the "TIS-620" in the 'queryCharset' :o , but it didn't stop the English words being translated to Thai or make the Thai words get translated to English. So I'll take it out of my plugin.

I don't think there's much more to do - we have a solution to translating in both directions (use two versions of the plugin), so that is what I'll use. Thanks for your interest and help.

Posted

for those of us that are computer challenged , what does all this mean??

is this something that is useful in daily writing situations?

if so, then i should want it, so what do i do in 1.2.3. terms? (like a recipe please, that i can handle)

i use those dics a lot si what is the benefit between just looking up the word at their sites (or is that what u are already doing)

i use firefox but every other day there is a new update, does this change everything (it seems to change a lot of other stuff i have)??

once all this works for me, and for you, maybe somebody should consolidate it all in one post and pin it with the other pinups.....cause its hard to read thru the whole thread and understand what to do....

Posted
for those of us that are computer challenged , what does all this mean??...

Well, the good news is, this is a Firefox extension that you can use, right now!

The name is "Conquery" and you can get it from here: http://conquery.mozdev.org/installation.html

The simplification that this extension gives is that you simply select the word that you want translated (i.e. you 'highlight' it with your mouse), you then right-click on it, and you will see a "Query to..." option in the menu. Then you move you mouse over the option, click, and you get a load of other options, as in this picture:

conquery2a0ov.jpg

After clicking on the desired translation web site, the word is passed to that web site for translation, and all you have to do is wait for the results.

So really, all this extension does is to avoid having to copy the word, go to the web site and paste it into the appropriate box. But, if you do that a lot and with lots of different webs sites, it certainly speeds things up quite a lot.

So after you install the extension - if you want to do it - I can email you the plugins that work with the web sites we've been talking about here. (You'll have to PM me with an email address).

I'm sure you'll find it worth while, even though it sounds a complicated installation procedure. :o

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.



×
×
  • Create New...