I have a project which I want to translate into multiple languages for the PHP Part I use Zend Frameworks Zend_Translate with GetText. Now I want to translate the JS part too.>
I have a PHP web page that also exists in several languages. I have written my own language class in PHP and when it came to localizing the JavaScript files I just configured the server to execute .js files as PHP too, and I used my PHP class to translate JavaScript strings.
Something like this:
alert ( 'Get ( 'MyString' ); ?>' );
I just include a file that initializes the "$l" at the beginning of every JavaScript file. I have no problems with this.