I implemeted localisation in my page. My aim is to display the message in localised language in javascript alert box. I created 2 langauges other thanEnglish namely Hindi and French. In my page i have one label and one button. Label displayed as 'Message'
based on the language and when i click button, show javascript alert box with 'hello' based on the culture.
My label worked correctly in French and Hindi. But my alert box showed only in French. For Hindi it shown as square, but in label hindi displayed correctly. Can any one help about this problem
akhilrajau
Participant
1744 Points
537 Posts
Character Encoding Problem in Javascript Alert Box
Sep 13, 2011 11:25 AM|LINK
hi,
I implemeted localisation in my page. My aim is to display the message in localised language in javascript alert box. I created 2 langauges other thanEnglish namely Hindi and French. In my page i have one label and one button. Label displayed as 'Message' based on the language and when i click button, show javascript alert box with 'hello' based on the culture.
My label worked correctly in French and Hindi. But my alert box showed only in French. For Hindi it shown as square, but in label hindi displayed correctly. Can any one help about this problem
protected void Page_Load(object sender, EventArgs e) { System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("hi-IN"); System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("hi-IN"); lbl.Text = GetGlobalResourceObject("General", "message").ToString(); string confirmText = GetGlobalResourceObject("General", "displayValue").ToString(); Button1.Attributes.Add("onclick", " alert('" + confirmText + "');"); }Akhil Raj K R
Please Mark as Answer if it helps u...
shashankgwl
All-Star
18926 Points
3662 Posts
Re: Character Encoding Problem in Javascript Alert Box
Sep 13, 2011 12:40 PM|LINK
I'll suggest to use ModelPopupExtender, because it is capable of showing HTML as popup hence any font can be seen.
All is well if it runs well.
blog
akhilrajau
Participant
1744 Points
537 Posts
Re: Character Encoding Problem in Javascript Alert Box
Sep 21, 2011 09:58 AM|LINK
Thanks friend for your idea. I am using Telerik controls and i used radalert for this purpose and worked fine
Akhil Raj K R
Please Mark as Answer if it helps u...