| Author |
javascript alert message in russian language
|
Suresh Reddy Puli
Greenhorn
Joined: Aug 31, 2006
Posts: 2
|
|
I need help to get javascript alert message to be displayed in russian language in an html page. The code for the message in my properties files is Банки which is means "Banks" in english. Kindly help me know the code for getting this done.
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
One way to use a message from your properties file in a JavaScript alert would be to create a global JavaScript variable in your JSP like this: <script> var g_errorMessage = '<bean:message key="error.key" />'; </script> When the page is rendered, the g_errorMessage field will contain the value of the message in the language of the user's current locale. Then, when you're ready to display the message, just write: alert(g_errorMessage);
|
Merrill
Consultant, Sima Solutions
|
 |
Suresh Reddy Puli
Greenhorn
Joined: Aug 31, 2006
Posts: 2
|
|
|
I tried with this. Though i did not get required message. Its displaying unicode as it is. Please help me. Its very urjent.
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
Try putting the following at the beginning of your JSP: <%@ page language="java" contentType="text/html; charset=windows-1251" pageEncoding="windows-1251" %>
|
 |
 |
|
|
subject: javascript alert message in russian language
|
|
|