Ticket #7283: i18n.patch

File i18n.patch, 3.2 KB (added by jdetaeye, 16 years ago)

Documentation update

  • docs/i18n.txt

     
    22Internationalization
    33====================
    44
    5 Django has full support for internationalization of text in code and templates.
    6 Here's how it works.
     5The goal of internationalization is to allow a single Web application to offer
     6its content and functionality in multiple languages.
    77
     8It has 2 aspects, both of which are fully supported by Django::
     9
     10    * Internationalization is the process of designing an application
     11      so that it can easily adapt to different characters.
     12    * Localization is the process of translating text to the language of the
     13      user.
     14     
     15The section below describes the localization aspect. The internationalization
     16aspect is covered in the documentation on `Unicode data in Django`_.
     17
     18.. _Unicode data in Django: ../unicode
     19
    820Overview
    921========
    1022
    11 The goal of internationalization is to allow a single Web application to offer
    12 its content and functionality in multiple languages.
    13 
    14 You, the Django developer, can accomplish this goal by adding a minimal amount
    15 of hooks to your Python code and templates. These hooks are called
     23You, the Django developer, can accomplish localization by adding a minimal
     24amount of hooks to your Python code and templates. These hooks are called
    1625**translation strings**. They tell Django: "This text should be translated into
    1726the end user's language, if a translation for this text is available in that
    1827language."
     
    2736    * It uses these hooks to translate Web apps for particular users according
    2837      to their language preferences.
    2938
    30 If you don't need internationalization in your app
    31 ==================================================
     39If you don't need localization in your app
     40==========================================
    3241
    33 Django's internationalization hooks are on by default, and that means there's a
     42Django's localization hooks are on by default, and that means there's a
    3443bit of i18n-related overhead in certain places of the framework. If you don't
    35 use internationalization, you should take the two seconds to set
    36 ``USE_I18N = False`` in your settings file. If ``USE_I18N`` is set to
    37 ``False``, then Django will make some optimizations so as not to load the
    38 internationalization machinery. See the `documentation for USE_I18N`_.
     44use localization, you should take the two seconds to set ``USE_I18N = False``
     45in your settings file. If ``USE_I18N`` is set to ``False``, then Django will
     46make some optimizations so as not to load the localization machinery.
     47See the `documentation for USE_I18N`_.
    3948
    4049You'll probably also want to remove ``'django.core.context_processors.i18n'``
    4150from your ``TEMPLATE_CONTEXT_PROCESSORS`` setting.
    4251
    4352.. _documentation for USE_I18N: ../settings/#use-i18n
    4453
    45 If you do need internationalization: three steps
    46 ================================================
     54If you do need localization: three steps
     55========================================
    4756
    4857    1. Embed translation strings in your Python code and templates.
    4958    2. Get translations for those strings, in whichever languages you want to
Back to Top