Click here to Skip to main content
12,758,135 members (30,922 online)
Rate this:
Please Sign up or sign in to vote.
See more: C++ C
I want the code for a translator program.

How to translate each word in a document with that app, if no translation of the word is found the text should remain as is.

How can do this?
Posted 27-Sep-12 9:31am
Updated 27-Sep-12 10:10am
Joan M89.8K
Sergey Alexandrovich Kryukov 27-Sep-12 15:01pm
I can imaging some French people watching the results. I think they would be really insulted by such an abuse of their language. I never saw acceptably good results from those translators, even the best ones. They can be really useful for reference, but hardly more.
Sergey Alexandrovich Kryukov 27-Sep-12 15:02pm
By the way, did you notice: this is a Questions & Answers forum? Where is your question? :-)
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

It doesn't work like that.
You try to do your work, you get stuck, you ask a question.

Just demanding code to do the whole thing is a good way to annoy people.

And how the heck do you expect a stupidly simple technique as that to work?
For example, the English word "dear" can mean "expensive", "loved one", "formal greetings", "cherished", "earnest" and "heartfelt". Which one do you expect your algorithm to select?
Sergey Alexandrovich Kryukov 27-Sep-12 18:22pm
He-he, some of the synonyms from the list won't work, because in no content one would use "formal greeting" instead of "dear" even when the greeting is formal:
"Formal greetings Ladies and Gentlemen! Let me declare our conference open" :-)
Yes, yes, I do understand what do you mean; my 5 for listing that many :-)

So, the context, synonyms, homonyms... all that stuff. Many discussed here the use of the automatic translation, so the question is: how existing translator managed to deal with that? A lot of rocket surgery involved, but to me, the best answer is: they just don't. Actually, I am amazed with the progress. But it's still amazing how spectacular is the failure to translate simple things. In fact, we have a whole genre of humor based on quoting real-life translation from English to Russian and back, and also on spell checkers. I cannot forget the work spelling suggestion when it faced correctly spelling Russian word "multichannel". The word was not in the dictionary, so the Word's suggested spelling was two Russian words meaning "anal animated cartoon" (!), and this is without the context.

Please see my comment to the question -- about French people. No, we are not there yet...

OriginalGriff 28-Sep-12 3:11am
"anal animated cartoon" :OMG:

I shall stop using the word "multichannel" immediately! :laugh:
Sergey Alexandrovich Kryukov 28-Sep-12 13:34pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

i think:
first,if you do this,your program must be very very big.
if can,using google translate,in your program.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 29 Sep 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100