CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 translations

Print topic Send  topic

Author Message
dragoon


Posts: 173
Posted: 02/02/2006, 12:41 PM

I want to pass a translation into a javascript variable string.
The problem is I want to pass \t, \n, so I can use an alert.

how I'm supposes to write this in the translation editor. Actually i want to escape the \?
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.