If your project wants to support multi-lingual versions, then you need to use zend_translate. Zend_translate's detailed documentation is here, but if you want to be lazy, it's also easy, and in the View Helpers documentation, you can easily implement multi-lingual support with Translate Helper.
1. Prepare translation documents
Zend_translate supports translation files in multiple formats. Choose which format to refer to here. If the entries are not many (below 5,000), consider using the most intuitive array format, and you can write to a php file. Suppose, we need a Chinese version of support, the translation file named zh_cn.php, placed in parallel with the application languages folder. The contents of the document are as follows:
Return Array ( ' Hello_world ' = ' Hello! ', );
2. Loading translation files
Edit the html/index.php file and insert the following code before the front-end controller runs:
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.