Reply
Thread Tools Display Modes
Unread 02-04-13, 08:01 AM   #1
Socratesx
A Murloc Raider
Join Date: Feb 2013
Posts: 4
Question Dictionary in game

Hello guys! I am from Russia so i am sorry for my english. I am learning German atm. And i tried to find any addon that can translate words in game (just single words). But i didn't find anything. Maybe do you know something like this? Or maybe anyone can make that? it would be amazing and very necessary for guys who like to learn foreigh languages! Thanks for your attention!
Socratesx is offline   Reply With Quote
Unread 02-04-13, 10:41 PM   #2
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,260
It's definitely possible, but I am not aware of any addons that offer this feature currently.

In the past, there have been addons that showed translated text for quest descriptions, etc. For example, there was an addon for Japanese players that showed an extra panel next to the quest log, showing the quest description translated into Japanese. There is/was also an addon for Chinese players to show all text in English (the Chinese client does not offer an English language pack). I'm not sure if any of these are still maintained, but if they are, they might give you (or someone else) a good starting point.

Can you be more specific about what actual functionality you want? For example, do you want to type a Russian word in a box, click a button, and get a German translation for the word?
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Unread 02-05-13, 10:37 AM   #3
ravagernl
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,145
I quite like the idea of trying to learn non-native languages while playing

Something like http://www.wowinterface.com/download...ictionary.html maybe?
ravagernl is offline   Reply With Quote
Unread 02-05-13, 12:09 PM   #4
Socratesx
A Murloc Raider
Join Date: Feb 2013
Posts: 4
Originally Posted by ravagernl View Post
I quite like the idea of trying to learn non-native languages while playing

Something like http://www.wowinterface.com/download...ictionary.html maybe?
It seems realy what i want! But i should test it. Thanks you dude! I will feedback.

I checked and it doesn't work so sad( So i still need same addon ! And i need to translate just chat. i don't care about questing and etc. "It includes a window that picks up text from various other windows and events and automatically translates a word when the mouse hovers it. " - it is EXACTLY what i need =)

Last edited by Socratesx : 02-05-13 at 12:31 PM.
Socratesx is offline   Reply With Quote
Unread 02-06-13, 12:58 AM   #5
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,260
Originally Posted by Socratesx View Post
i need to translate just chat.
This would be pretty hard, actually. Not only do both of the languages involved (Russian and German) have many variations for every word (genders, cases, tenses, compound words, etc.) but chat messages are often misspelled or abbreviated. Add in slang terms, colloqualisms, and names -- all of which are often confusing or totally senseless when translated literally -- and there's a huge amount of complexity, and that's just word-to-word translation. Word order and sentence structure differ between languages, too, and that's much harder to deal with.

Even desktop chat programs don't really have any good real-time translation engines. It's just really hard to do. Trying to do it in a WoW addon would be a huge nightmare.

For example, consider the following Russian text:
Вам нужно изменить облик с помощью полиметановой кислоты.

The English version of this is:
You must be transformed by Polyformic Acid.

If you translated it literally, word for word, from Russian to English, you get:
You necessary change shape with by ??? acid.

You can sort of figure out what it means, but it's not even close to good grammar, and wouldn't be very helpful if you were trying to learn English that way.

Back on topic, translating the same text literally, word for word, from Russian to German yields:
Sie notwendig ändern gestalten mit durch ??? Säure.

Compare that with the correct German translation from Blizzard:
Ihr müsst von der Polyformsäure verwandelt sein.

There's not a single word in common, and I'm sure the literal translation would confuse even native German speakers!

As for "полиметановой", it's not a real word from the dictionary, so it's not even possible to translate it literally without a human brain (or an advanced AI) fluent in the language breaking it down into pieces and making assumptions about what they mean put together that way. For example, a native English speaker like myself sees the made-up word "Polyformic" and breaks it down into "poly" (many) + "form" + "ic" (having to do with) and infers that the word means "having to do with many forms/shapes", so it's fairly obvious what the name "Polyformic Acid" means, especially in context in-game -- it's a shape-shifting potion.

With my very basic knowledge of Russian, I can break down "поли" and guess it means the same thing as the English "poly" + "мета" which can be translated to "goal" or "purpose" or "use", + "новой" (new). While I'm sure the word as a whole makes sense to you (as a native Russian speaker) my best guess would be "many new uses" which hardly makes sense on its own, and doesn't come close to being an accurate translation of the actual meaning. Most machine translation services would not even be able to do that much.

Hopefully this helps you understand why this kind of translation addon is not really possible.

It would be possible (and easy) to replace specific words/terms (eg. replace "Сердце Страха" with "Herzen der Angst") but translating whole sentences -- especially the abbreviated, misspelled, and grammatically incorrect sentences you see in chat -- is really just not possible to do in an addon.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!

Last edited by Phanx : 02-06-13 at 01:01 AM.
Phanx is offline   Reply With Quote
Unread 02-06-13, 04:21 AM   #6
Socratesx
A Murloc Raider
Join Date: Feb 2013
Posts: 4
Phanx, Thanks for your huge post,it is truth about grammar but i guess you don't understand me. I speak about translate "just single word", ofc i don't speak about anything like google translate, i actually don't need that. (you will not remeber word if you translate all text in one moment) And if anyone can do addon that can translate German to English it will be very good for me.(if German to Russian - it will be gift of GOD )
Socratesx is offline   Reply With Quote
Unread 02-07-13, 03:34 AM   #7
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,260
Originally Posted by Socratesx View Post
I speak about translate "just single word"
Right, but where do you want the word to come from? If you want it to come from a chat message, your only options are (a) type the word into a box yourself, or (b) copy the whole chat message and translate each word in the message separately.

There isn't a way to programatically determine which word is under the mouse cursor. You can tell which font string object is under the mouse cursor, and get the whole text of the font string. You could also try to guess which word is under the cursor -- if the font string is 100px wide, and the mouse is 25px from the left, try to guess which word is there by going through each letter/space/etc in the font string's text and guessing its width based on a fixed table (eg. "i" takes up 3px of screen space, "m" takes up 9 px, etc) -- but since the width of letters depends on both the text size and the properties of the font face you're using, it's tricky and unreliable.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Unread 02-08-13, 08:28 AM   #8
Socratesx
A Murloc Raider
Join Date: Feb 2013
Posts: 4
http://www.wowinterface.com/download...?id=13248#info But he did or not?
Socratesx is offline   Reply With Quote
Unread 02-08-13, 11:54 AM   #9
ravagernl
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,145
If you understand what Phanx told you, then no, that AddOn does not do it that way.
ravagernl is offline   Reply With Quote
Unread 02-08-13, 11:26 PM   #10
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,260
I didn't look at that addon's code, but since it is showing a copy of the text in a separate window, I'd guess that it is likely reading the whole text of the original font string, using string.split or string.match to identify each word, and then creating a separate font string (or maybe even a separate frame) for each word. Either that, or it's doing what I described in my last post, and guessing based on the font size and the assumed widths of individual letters. Such guesses will be fairly accurate with the default WoW font at the default size used by the addon, but if you change the font size, or change the font itself, the accuracy will drop significantly the further from the default font you go.

As I already stated, there is no API for "get the word under the cursor". There is only an API for "get the frame under the cursor", and for "get the font string on that frame", and for "get the text of that font string".
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!

Last edited by Phanx : 02-08-13 at 11:28 PM.
Phanx is offline   Reply With Quote
Reply

Go BackWoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Dictionary in game

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off