Magento Forum

   
Getting rid of Translator Script from header
 
jemoon
Sr. Member
 
Avatar
Total Posts:  128
Joined:  2008-09-30
Gdansk, Poland
 

Hi,
Does anybody know how can I get rid of Translator script from every header of my store’s page, I mean this code:

<script type="text/javascript">var Translator = new Translate
here goes some long
long translation text :)
.
.
</script>

P.S
I don’t want to comment or erase translator line from head.phtml because I would like to use those translations (I need them because I have a non-english store), please let me know is there a possibility of making some csv file which will be used instead the script.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

Did you find out how to do this? There does seem to be an unnecessary amount of stuff in there. Is it only present if using a different locale?

 
Magento Community Magento Community
Magento Community
Magento Community
 
LeeSaferite
Guru
 
Avatar
Total Posts:  322
Joined:  2007-08-31
Lake City, FL
 

I imagine if you edited the head.phtml tempalte file and removed the line :

<?php echo $this->helper('core/js')->getTranslatorScript() ?>

You would solve the problem of loading the Translator script.  What I’m unsure of is the impact that would have.  There is obviously the possability of breaking other things when you do this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jemoon
Sr. Member
 
Avatar
Total Posts:  128
Joined:  2008-09-30
Gdansk, Poland
 

Hi,
Lee Saferite
Removing this line just eliminates the translator script which is good for all US/EN language shops. As far as I noticed script is responsible for translation of all form’s aletrs eg. those when you have invalid input at single page checkout.
Discovery
I have managed to remove it by translating all alerts into my language (you can find those alerts at: js/prototype/validation.js file). Then I just commented:

<?php echo $this->helper('core/js')->getTranslatorScript() ?>
at template’s head.phtml file. One bad thing which brings this solution is that you can’t use multilingual shop without translation script so this solution should be applied only for one language based shops.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tutti
Member
 
Total Posts:  33
Joined:  2009-02-17
 

This worked like a charm! Tnx jemoon.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top