Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET Javascript jQuery , +
Hello,
 

I am creating one application with localization.
I wanna to use jQuery error popup messages to be changed according to the language selected by user(localization).
 
I have two master pages used, under that there is one content page which has some jQuery validation popup.
 
Please help me
 
Thanks in advance..
Posted 11-Apr-13 1:11am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I think I have better solution for this..
 

 
We need to add following lines in .master page
 
<script type="text/javascript" src="Scripts/Validation/jquery-1.8.0.js"></script>
<script type="text/javascript" src="Scripts/Validation/jquery.validationEngine.js"></script>
 
<link href="Styles/Validation/validationEngine.jquery.css" rel="Stylesheet" type="text/css" />
 

 
<script type="text/javascript" language="javascript">
$(document).ready(function () {
$("#form1").validationEngine('attach', { showOneMessage: false, scroll: false, promptPosition: "topCenter", focusFirstField: false });
}
);
</script>
 

 
and in form tag--
 

 
<table id="Table1" runat="server">
<tr id="Tr1" runat="server">
<td runat="server" id="tdValidation">
 

 
add following lines in codebehind in page load
 

Literal l = new Literal();
if (Convert.ToString(Session["changeLang"]).ToLower() == "en-US".ToLower())
l.Text = "<script type=\"text/javascript\" src=\"Scripts/Validation/jquery.validationEngine-en.js\"></script>";
else if (Convert.ToString(Session["changeLang"]).ToLower() == "ja-JP".ToLower())
{
l.Text = "<script type=\"text/javascript\" src=\"Scripts/Validation/jquery.validationEngine-ja.js\"></script>";
}
tdValidation.Controls.Add(l);
 

 

 
This will work fine, it will use the ValidationEngine file according to selected culture
  Permalink  

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

  Print Answers RSS
0 BillWoodruff 330
1 Mathew Soji 309
2 Maciej Los 295
3 DamithSL 225
4 Afzaal Ahmad Zeeshan 217
0 OriginalGriff 6,369
1 Sergey Alexandrovich Kryukov 5,973
2 DamithSL 5,183
3 Manas Bhardwaj 4,673
4 Maciej Los 4,025


Advertise | Privacy | Mobile
Web01 | 2.8.1411019.1 | Last Updated 15 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100