Click here to Skip to main content
13,045,180 members (40,525 online)
Rate this:
Please Sign up or sign in to vote.

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>

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

and in form tag--

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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 15 Apr 2013
Copyright © CodeProject, 1999-2017
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