Click here to Skip to main content
11,706,007 members (47,822 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET Javascript jQuery , +

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 0:11am

1 solution

Rate this: bad
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 });

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>";

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

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

  Print Answers RSS
0 OriginalGriff 196
1 Sergey Alexandrovich Kryukov 151
2 ppolymorphe 61
3 Inimicos 60
4 ProgramFOX 50
0 OriginalGriff 9,050
1 Sergey Alexandrovich Kryukov 8,417
2 CPallini 5,189
3 Maciej Los 4,726
4 Mika Wendelius 3,636

Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 15 Apr 2013
Copyright © CodeProject, 1999-2015
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