Django Admin background interface in English change to Chinese display

Source: Internet
Author: User
Tags web services

Create a Django project, I use the Django 1.8.2, create a project, set the Chinese display support definition in settings.py

Language_code = ' en-US ' #改为zh-hans
error if changed to ZH-CN

Error notification

Django Ioerror:no translation files found for default language ZH-CN

The corresponding localization file for ZH-CN is not found. In general, the ZH-CN encoding corresponding to the localization folder for ZH_CN, I went to the Django installation directory to find ZH_CN, the results did not find, in the Django installation directory contrib subdirectory under the list of subdirectories in the locale folder, there is no ZH_CN, And there are zh_hans. The Zh_hans directory can be copied all a copy and named ZH_CN, you can solve this problem, the Admin interface displays the Chinese language.

What does use_i18n and use_l10n in settings.py mean when Web services are set up and can receive access from users from different countries around the world. This requires developers to tweak the software so that it can be used in different languages, namely internationalization and localization. There are 18 letters between internationalized –internationalization,i and N, abbreviated as i18n. Localized –localization, with 10 letters between L and N, referred to as l10n. Internationalization means that Web products have the potential to work anywhere, for program developers, and localization is the process of directing an international program to actually translate for use in a particular region, for translators.

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.