Last post Aug 09, 2011 02:31 AM by Anil Kumar Choudhary
Dec 28, 2010 10:34 AM|yadlapalli_ramesh|LINK
In my ASP.Net website, I need the total webpage static content needs to change into French from English when I click a button. How can I achieve this? Please help me.
Dec 29, 2010 07:24 AM|juhi_it|LINK
In above link the code is given for convert launguage.try it........
Dec 29, 2010 07:39 AM|ankur.nigam|LINK
As you are working with static text, you got 2 alternatives. First is converting the text from English to French and store all the information in Resource file. Thereafter, associate the text properties of the controls like Label etc. with it.
API can be found here:
Also, I would suggest to change the culture settings as well when you are modifying the page language by overwriting server event InitializeCulture().
Dec 29, 2010 09:12 AM|sachingusain|LINK
Here are some resources:
Jan 01, 2011 12:58 AM|sandy060583|LINK
There are multiple ways to achieve this.
1. Using Resource file generate localresource files for your local resources like labels , image urls , validation messages on the aspx pages.
--> this approach will help you to convert your local resources into multilingual, if you also want your data stored in DB also be in multilingual than you need to change your DB structure & store data in each language.
Note : we usually do not convert data entered by user into ML (multilingual), data that is entered by admin can be in ML.
2. Using Database fetch each language data from DB , labels , image urls , validation messages etc...
3. Last option is to use google translation , microsoft language api to convert whole website in multiple language by just putting language translator tool in your website.
Now you can choose your option from above & let us know which one you want to go for.??
Hope this will help !!!
Apr 04, 2011 12:16 PM|kanth99|LINK
I tried creating multiple resx file for all the static content on my pages. But what I would like to accomplish is also to translate the dynamic content using some translation engine if the text is not found in resx file. I am open to using bing or google
api to do the translation. But I am not sure how to di this. Could you please throw some light on that?
Aug 09, 2011 02:31 AM|Anil Kumar Choudhary|LINK
My application is developed in .Net 4.0 and sql server. I want to convert my website into multilingual and I used google API to achieve this.
I have added GoogleTranslateAPI.dll in my solution. When My code come to line below.
string translated = Translator.Translate("Hello",Language.English ,Language.Japanese); it generate and exception message
---> Google.API.GoogleAPIException: Failed to get response. ---> System.Net.WebException: Unable to connect to the
remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not
properly respond after a period of time, or established connection failed because connected host has failed to respond
126.96.36.199:80 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address,
ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) --- End of inner exception stack trace
--- at System.Net.HttpWebRequest.GetResponse() at Google.API.RequestUtility.GetResponseData[T](WebRequest request)
--- End of inner exception stack trace --- at Google.API.RequestUtility.GetResponseData[T](WebRequest request)
at Google.API.Translate.Translator.Translate(String text, String from, String to, TranslateFormat format) --- End of inner exception
stack trace --- at Google.API.Translate.Translator.Translate(String text, String from, String to, TranslateFormat format) at
Google.API.Translate.Translator.Translate(String text, Language from, Language to, TranslateFormat format)