Zendframework2 tutorial [4]-translation and Style

Source: Internet
Author: User
Tags i18n
The example we downloaded from git is very good, but we need to modify the title and remove the copyright information. The default application uses the ZendI18n's translation mechanism to translate all texts. It uses the. po file located in the Applicationlanguage directory. You need to download the poedit software to modify the text content. Open poedit and open applicationlangulanguag

The example we downloaded from git is very good, but we need to modify the title and remove the copyright information. The default application uses the Zend \ I18n's translation mechanism to translate all texts. It uses the. po file located in the Application/language directory. You need to download the poedit software to modify the text content. Open poedit and open application/register AG

The example we downloaded from git is very good, but we need to modify the title and remove the copyright information.

Default Application UsageZend \ I18n'S translation mechanism to translate all texts. It uses the. po file located in the Application/language directory. You need to download the poedit software to modify the text content. Open poedit and open application/language/en_US.po, click "Skeleton Application" in the list, and enter "My zf application" in the blank column to translate it, you can use any statements you like. After translation, click Save on the toolbar. poedit creates an en_us.mo file for us. If you find that the. mo file is not generated, click "file-preference-Editor" at one time to check whether the check mark before "automatically compile the. mo file upon Saving" in the "behavior" column is checked.

To remove copyright information, edit the layout. phtml View Script in the Application module:

// Module/Application/view/layout. phtml: // Remove this line:

©2005-2012 by Zend Technologies Ltd. Translate ('allrights reserved. ')?>

Refresh the previously created homepage to see the translation effect.

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.