Re: Multilingual website, texts in external JavaScript problem

From: Date: Mon, 09 Nov 2009 12:50:42 +0000
Subject: Re: Multilingual website, texts in external JavaScript problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-299736@lists.php.net to get a copy of this message
On Nov 9, 2009, at 1:04 AM, leledumbo <leledumbo_cool@yahoo.co.id> wrote:
I need to create a multilingual website and my framework already gives me that facility. However, I also use JavaScript quite extensively and since XHTML 1.0 Strict doesn't allow inline script, I must use external .js file. The problem is in these scripts, there are strings that needs to be translated as well. How can I make PHP parse these scripts as well? Or are there alternative approaches? --View this message in context: http://old.nabble.com/Multilingual-website%2C-texts-in-external-JavaScript-problem-tp26261666p26261666.html Sent from the PHP - General mailing list archive at Nabble.com. --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
I use a standard error code ( error.2510 ) treating it as the js array key, and then call the correct language file with translated value Bastien

« previous php.general (#299736) next »