Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

I need to send an sms to different countries.The message we type in English.Please help to convert to different language in vb.net.The conversion will be based on conuntries.

For example if the country is Bangaldesh the string "You received an SMS from US." to be converted to Bangladesh language.

Please help.

What I have tried:

Searched in ggole but didnt get the exact conversion procedure.
Posted
Updated 19-Jul-16 22:24pm

You can't use CultureInfo to convert languages: it's only applicable for date and number formats, that sort of thing.
To do machine natural language translation is a major job: Microsoft have an API: Microsoft Translator[^] and so does Google: https://cloud.google.com/translate/v2/pricing[^] - however I haven't used either of them, and I understand that they are both paid-for services after some point.
You may be able to get away with scraping the Google translate page: Google Translate[^] but I'd imagine that will be a fair amount of work, and may "break" when they change the page design (as they do quite often).
 
Share this answer
 
If you know all the messages you will send, you can use Resources and ResourceManager. First of all, each of the messages needs an identifier. In the resource for the "neutral" culture (en-US), you'll provide the English texts for the identifiers. Then you hand over that resource file to a company specialized in software translations and tell them which languages you need (but note: that's not cheap; in Germany, you pay about 1 Euro for such a short message for "common" languages, some 3 Euros for not-so common languages like Bengali). Add the translated resource files to your project, and compile. Use resourceManager.GetString(yourIdentifier, yourCultureInfo) to get the message in the foreign language.
 
Share this answer
 
Contact someone who speaks Bangladeshi (or contact a professional translation firm, google to find some) and ask them to translate "You received an SMS from US". Use that translation in your code. Computers have no in-built ability to translate languages.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900