Magento Background language

Source: Internet
Author: User
Tags locale zend

Magento background itself carries a language switch function, see the bottom left corner of the background

You will find a long string, most of which you may not have the opportunity to use, and you want to switch from Chinese to English, every time you have to stare big eyes to find English in which position in the drop-down box, so the simplification is still necessary.

Take my own needs for example, I need to use the Chinese background, occasionally switch to English, because some translation is not ideal to see the original text, then I will only retain the "Chinese (China)" and "English (United States)." Open the root directory under/lib/zend/locale/data/ Zh.xml file, in about 640 lines find the territories tag, you can see that this tag contains a long list of countries, all the territory label all out, only to remove China and the United States

<territories><territoryType="CN"> China</territory><territorytype= "us" > USA </territory><!--Alex < Territory type= "001" > World </territory><territory type= "002" > Africa </ Territory><territory type= "003" > North America </territory> <territory type= "005" > South America </territory> <territory type= "ZM" > Zambia </territory><territory Type= "ZW" > Zimbabwe </territory><territory type= "ZZ" > Unknown or invalid area </territory >--></TERRITORIES>      

Clear the cache, now, in the Chinese state, the background drop-down box you will see only these two options, but when you switch to English after the drop-down box has become a long list, so we also need to do similar processing/lib/zend/locale/data/en.xml

<territories>        type="US">united statesType="CN">china <territory type= "001" >World</territory> <territory type= "002" >africa</territory > ... .... ... .... ... .... ... .... ..... ..... ..... ..... ..... ..... ... .. ..... ..... ..... .......-...........          

Now try the effect, the Chinese and English switching is very convenient

Magento Background language

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.