Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How do I remove the “if TRANSLATOR” validation from Checkout?  Having some issues
 
NickL
Sr. Member
 
Avatar
Total Posts:  188
Joined:  2007-08-31
 

I’m having some issues with the if (Translator) javascript during checkout… Firebug keeps giving me:

Translator is not defined
in  
<...>  /js/prototype/validation.js
Line 184

Can I remove this so it doesn’t try to validate with this Translator?  I’ve tried copying over all the necessary [removed]

in Skin
in root js
in page/js

But I still get this error.  Can this javascript be removed?

 
Magento Community Magento Community
Magento Community
Magento Community
 
NickL
Sr. Member
 
Avatar
Total Posts:  188
Joined:  2007-08-31
 

k… i’ve realized this is isolated to the new “translate.phtml” file.  It has a collection of error messages. But how are these inserted into the new templates? I am using my old templates and I want to update them. All I see in translate .phtml is:

<script type="text/javascript\">
var Translator = new Translate(<?=Zend_Json::encode($_data)?>);
</script>

I have this file in my folder.. but it still says “Translator not defined”

 
Magento Community Magento Community
Magento Community
Magento Community
 
NickL
Sr. Member
 
Avatar
Total Posts:  188
Joined:  2007-08-31
 

SOLVED! Moshe thanks a ton for showing us the wiki article on the Magento Architecture.  I just had to relax, sit back, and think about what’s going on.  The problem was completely my fault…

I had NO reference at all to translate.phtml and translate.js in my MAIN.XML.  I had removed them when I copied and pasted code from my old Default.xml!  Once i put the correct blocks back in everything worked fine! 

Whew!  I swear Magento is helping me learn more & more about programming.  I love it!

<block type="page/js_translate" name="js_translate" as="js_translate">
                    <
action method="setTemplate"><template>page/js/translate.phtml</template></action>
                </
block>

That’s what I was missing.  An silly mistake, but I’m actually glad it happened. I’m understanding the structure more and more…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

@NickL: Thank you for letting us know smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
mayersdesign
Jr. Member
 
Total Posts:  10
Joined:  2010-06-08
 

Updating this old thread. Check you did not remove:

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

from “head.phtml” (like I did! Doh!)

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