Jump to content

Language Translation Issues


Recommended Posts

Hi Guys

 

I recently fixing a vi that can translate all the English to Spanish, and Spanish back to English. 

 

Here is how this vi works: there is a dictionary table there, header will be English, Chinese, French, Spanish, etc

 

All the words will be ordered by the length of the English words, so that it can only start searching from the longest words to the shortest one

 

And inside the for loop, it will use export all the english word out one by one and use the search and replace function to check the "Input Text", if found it, then it will replace it and go to shift register and ready for next translation.

 

The reason allow it to translate couple times is because some string maybe a combination of few strings, for example " The remaining time is 5 Seconds" the number 5 will be keep changing, counting down or up, so this word need be translated twice complete with the first translation " The remaining time is" and the second one "Seconds" and make it as a complete translation. 

 

There is a bug in this translation vi is that it will also translate part of my word and mass up the whole sentence: for example, English word both "Automatic" and "Auto" will match with Spanish word "Modo Autom¨¢tico", so if I have the word "Automatic" for translation, it will first translate to  "Modo Autom¨¢tico", and because there is an "Auto" inside that Spanish word, it will translate it again, it becomes " "Modo  Modo Autom¨¢ticom¨¢tico", and mass it up.

 

I think I need check if the word I need translate is a complete word or sentence, than I will do the translation not just translate a part of a word. Because the word "Automatic" can exist in any sentence. 

 

But I have no idea how to determine if the word is a complete word or sentence, by check if there is a space or nothing before or after the translated word? if that, how to achieve that?

 

By the way, the "english" directory can not be changed, so I can not add something special between each word

 

Best

 

Hang 

post-52854-0-55424900-1413402115_thumb.p

post-52854-0-19477900-1413402117_thumb.p

Link to comment

But I have no idea how to determine if the word is a complete word or sentence, by check if there is a space or nothing before or after the translated word? if that, how to achieve that?

 

You don't need to do partial matching. You translate the string "The remaining time is %d Seconds" and use the format into string primitive.

.

You might want to take a look at Passa Mak. It will generate all the language files for translation and switch all the UI controls.

 

(Good luck with the Chinese one. I'm not brave enough to attempt the East Asian translations)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.