dragoon
Posts: 173
|
| Posted: 02/02/2006, 1:02 PM |
|
forget it. i have splitted into mutiple translations and I have concatenated them after in javascript.
but there is another problem that occurs:
var check_alert = "\t" + "{res:deductions_check_VAT_1}" + "\n\t" + "{res:deductions_check_VAT_2}" + "\n\n" + "{res:deductions_check_VAT_3}";
function maskKeyPress(objEvent) {
var iKeyCode;
iKeyCode = objEvent.keyCode;
var _locale = "{res:CCS_LocaleID}";
if (_locale == "ro") {
if ((iKeyCode >= 48 && iKeyCode <= 57) || (iKeyCode == 44))
return true;
}
else if (_locale == "en") {
if ((iKeyCode >= 48 && iKeyCode <= 57) || (iKeyCode == 46))
return true;
}
return false;
}
var check_alert = "\t" + "{res:deductions_check_VAT_1}" + "\n\t" + "{res:deductions_check_VAT_2}" + "\n\n" + "{res:deductions_check_VAT_3}";
goes into this:
var check_alert = "\t" + "The value of the VAT is incorrect !" + "\n\t" + " It is accepted: 0%, 9% or 19% only" + "\n\n" + "If you don't have VAT on your invoice, insert 0 in the VAT field !";
function maskKeyPress(objEvent) {
var iKeyCode;
iKeyCode = objEvent.keyCode;
var _locale = "en";
if (_locale == "ro") {
if ((iKeyCode >= 48 && iKeyCode <= 57) || (iKeyCode == 44))
return true;
}
else if (_locale == "en") {
if ((iKeyCode >= 48 && iKeyCode <= 57) || (iKeyCode == 46))
return true;
}
return false;
}
var check_alert = "\t" + "" + "\n\t" + "" + "\n\n" + "";
it seems that occasionally translations aren't rendered ...
actually I wanted to insert the check_alert below that function, into another function (where it should reside...because there I'm making some checks before submitting the form).
I played a little and I discovered that moving that variable before or even inside the maskKeyPress the translations are rendered. Moving down a bit the var. (just when this function ends) the translations aren't rendered.
this totally s.k.s
|