I have an accordion js module on my site which has labels for opening and closing the panel, now I could change the whole template to accommodate, but I just wondered if there is another way? Here's the js:
Code:
var panelSize = 110;
var effectDuration = 750;
var openString = "Open Panel";
var closeString = "Close Panel";
var transition = Fx.Transitions.bounceOut;
eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('w.j(9(){c()});c=9(){$(\'2\').4=$(\'2\').v(\'r\',{p:m,b:b});$(\'2\').4.i(-5);$(\'2\').3=0;$(\'u\').d.q=5+\'o\';$(\'n\').d.l="k";$(\'6\').7.8=a;$(\'h\').g(\'f\',9(){s($(\'2\').3==1){$(\'2\').4.e(0,-5);$(\'2\').3=0;$(\'6\').7.8=a}t{$(\'2\').4.e(-5,0);$(\'2\').3=1;$(\'6\').7.8=x}})};',34,34,'||fxContainer|state|fx|panelSize|fxTrigger|lastChild|nodeValue|function|openString|transition|initPullDown|style|start|click|addEvent|fxTab|set|onDomReady|visible|visibility|effectDuration|fxPadding|px|duration|height|top|if|else|fxTarget|effect|window|closeString'.split('|'),0,{}));
It is 'Open Panel' and 'Close Panel' text I would like to change dependent on language, but could I possibly duplicate the js and call it something like controlpanel-en.js within the template index.php?
The script is called in using this line in template index.php:
Code:
<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/js/controlpanel.js"></script>
Can I use a command within script calls dependent on $mosConfig_lang ?
Thx for giving it your consideration.