Q:

How to change language of a text written inside javascript in Cakephp 2.x?

I am trying to change language of my website using cakephp 2.x . I have created PO files for language translation and configured setting . It works fine with the links of menu in website . I achieve this by changing link like below :
<li id='start'><?php echo $this->Html->link(__d('default','Start', true),array('controller'=>'sensors','action'=>'dashboard')) ?></li>   

I need translations to work for a text which is written inside highmaps and highcharts , like below :
<script>
here is some script ...
text : 'Top 10 Country'
</script>

I want text top 10 country to be translated . If I define it like below :
<script>
    here is some script ...
    text : '__d(Top 10 Country)'
    </script>

Then it just prints the whole text as its inside string . Please help me on this , how can I translate these kind of text . Thanks.

A:

<script>
   here is some script ...
   text : "<?= __('Top 10 Country'); ?>"
</script>

