Magento – ‘Zend_Currency_Exception’ with message ‘No region found within the locale ‘en” in lib/Zend/Currency.php:553

currencyerrorlocalemagento-1.7

I'm getting this error in exception.log

This is happening only on Romanian Locale.

Also, in system.log I am getting this error:

2014-02-04T09:42:15+00:00 ERR (3): Warning: simplexml_load_file():
/lib/Zend/Locale/Data/ro.xml:637: parser error : Input is not proper
UTF-8, indicate encoding ! Bytes: 0xE2 0x80 0x3F 0x3C in
b/Zend/Locale/Data.php on line 161

In checkout, on Romanian store view, the countries dropdown is empty.
And, also in backend, I can not set the backend language to Romanian.
For English ( for example ) it is like this: English (United States) / English (United States).
For Romanian ( on my webshop ) is like this: () / Romanian (Romania)

Any help is appreciated. Thank you ! I'm using Magento ver. 1.7.0.2

Stack trace:

> #0 public_html/lib/Zend/Currency.php(101): Zend_Currency->setLocale(NULL)
> #1 /app/code/local/Mage/Core/Model/Locale.php(617): Zend_Currency->__construct('RON')
> #2 /app/code/core/Mage/Directory/Model/Currency.php(233): Mage_Core_Model_Locale->currency('RON')
> #3 /app/code/core/Mage/Directory/Model/Currency.php(238): Mage_Directory_Model_Currency->formatTxt(0)
> #4 /app/code/local/Mage/Core/Model/Locale.php(723): Mage_Directory_Model_Currency->getOutputFormat()
> #5 /app/code/core/Mage/Catalog/Block/Product/View.php(168): Mage_Core_Model_Locale->getJsPriceFormat()
> #6 /app/design/frontend/magento-boilerplate/default/template/catalog/product/view.phtml(69):
> Mage_Catalog_Block_Product_View->getJsonConfig()
> #7 /app/code/core/Mage/Core/Block/Template.php(241): include('/home/mediaswit...')
> #8 /app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/magent...')
> #9 /app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
> #10 /app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
> #11 /app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
> #12 /app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Text_List->_toHtml()
> #13 /app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
> #14 /app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('content', true)
> #15 /app/design/frontend/magento-boilerplate/default/template/page/2columns-left.phtml(53):
> Mage_Core_Block_Abstract->getChildHtml('content')
> #16 /app/code/core/Mage/Core/Block/Template.php(241): include('/home/mediaswit...')
> #17 /app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/magent...')
> #18 /app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
> #19 /app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
> #20 /app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
> #21 /app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
> #22 /app/code/core/Mage/Catalog/Helper/Product/View.php(147): Mage_Core_Controller_Varien_Action->renderLayout()
> #23 /app/code/core/Mage/Catalog/controllers/ProductController.php(132):
> Mage_Catalog_Helper_Product_View->prepareAndRender(901,
> Object(Mage_Catalog_ProductController), Object(Varien_Object))
> #24 /app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Catalog_ProductController->viewAction()
> #25 /app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250):
> Mage_Core_Controller_Varien_Action->dispatch('view')
> #26 /app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
> #27 /app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
> #28 /app/Mage.php(683): Mage_Core_Model_App->run(Array)
> #29 /index.php(87): Mage::run('', 'store')
> #30 {main}

Best Answer

You were right Evgeni Ivanov. I modified that file in the past, and yesterday when I opened it in Notepad, I had some special characters ... that was the problem.

I copied another filed ro.xml from another webshop and now everything is ok.

I posted it as an answer because, maybe, someone will find it useful.

Thank you.