|
From: Mark W. <ma...@rw...> - 2011-09-09 16:11:30
|
Hi All,
I noticed some sections of javascript that wern't working properly due
to the internationalisation not working. Some sections had PHP code
written into them which wasn't being parsed by PHP hence caused the errors.
So, I have implemented a simple way of getting JText data into the
application. The PHP version is: JText::_("HR"); The javascript
version is: jtext.get("HR");
The code to achieve this is in js/lang.js.php
The one caveat at the moment is that it can only be used by "HR" and
"MN". If you need to use more values then they need to be entered into
the lang.js.php file
Alternatively, If anyone would like to write something to grab all the
values and convert them into a javascript associative array, please be
my guest!
Mark
--
_____________________________________________
Mob: 07725 695178
Email: ma...@rw...
|