Django

Code

Changeset 1209

Show
Ignore:
Timestamp:
11/12/05 18:19:16 (3 years ago)
Author:
adrian
Message:

Grammar cleanups for recent documentation and docstring changes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/utils/translation.py

    r1208 r1209  
    257257    """ 
    258258    Checks whether there is a global language file for the given language code. 
    259     This is used to decide whether a user-provided language is available. this is 
     259    This is used to decide whether a user-provided language is available. This is 
    260260    only used for language codes from either the cookies or session. 
    261261    """ 
     
    328328def get_date_formats(): 
    329329    """ 
    330     This function checks wether translation files provide a translation for some 
     330    This function checks whether translation files provide a translation for some 
    331331    technical message ID to store date and time formats. If it doesn't contain 
    332332    one, the formats provided in the settings will be used. 
  • django/trunk/docs/i18n.txt

    r1205 r1209  
    427427      (Austrian German) but Django only has ``de`` available, Django uses 
    428428      ``de``. 
    429     * only languages listed in the LANGUAGES setting can be selected. So if you want 
    430       to restrict the language selection to a subset of provided languages (because 
    431       your appliaction doesn't provide all those languages), just set it to a list 
    432       of languages like this:: 
     429    * Only languages listed in the `LANGUAGES setting`_ can be selected. If 
     430      you want to restrict the language selection to a subset of provided 
     431      languages (because your appliaction doesn't provide all those languages), 
     432      set ``LANGUAGES`` to a list of languages. For example:: 
    433433 
    434434          LANGUAGES = ( 
     
    437437          ) 
    438438 
    439       This would restrict the available languages for automatic selection to German 
    440       and English (and any sublanguage of those, like de-ch or en-us). 
     439      This example restricts languages that are available for automatic 
     440      selection to German and English (and any sublanguage, like de-ch or 
     441      en-us). 
     442 
     443      .. _LANGUAGES setting: http://www.djangoproject.com/documentation/settings/#languages 
    441444 
    442445Once ``LocaleMiddleware`` determines the user's preference, it makes this 
  • django/trunk/docs/settings.txt

    r1206 r1209  
    404404--------- 
    405405 
    406 Default: a list of available languages and their name 
    407  
    408 This is a list of two-tuples with language code and language name that are available 
    409 for language selection. See the `internationalization docs`_ for details. It usually 
    410 isn't defined, only if you want to restrict language selection to a subset of the 
    411 django-provided languages you need to set it. 
     406Default: A tuple of all available languages. Currently, this is:: 
     407 
     408    LANGUAGES = ( 
     409        ('bn', _('Bengali')), 
     410        ('cs', _('Czech')), 
     411        ('cy', _('Welsh')), 
     412        ('de', _('German')), 
     413        ('en', _('English')), 
     414        ('es', _('Spanish')), 
     415        ('fr', _('French')), 
     416        ('gl', _('Galician')), 
     417        ('it', _('Italian')), 
     418        ('no', _('Norwegian')), 
     419        ('pt-br', _('Brazilian')), 
     420        ('ro', _('Romanian')), 
     421        ('ru', _('Russian')), 
     422        ('sk', _('Slovak')), 
     423        ('sr', _('Serbian')), 
     424        ('zh-cn', _('Simplified Chinese')), 
     425    ) 
     426 
     427A tuple of two-tuples in the format (language code, language name). This 
     428specifies which languages are available for language selection. See the 
     429`internationalization docs`_ for details. 
     430 
     431Generally, the default value should suffice. Only set this setting if you want 
     432to restrict language selection to a subset of the Django-provided languages. 
    412433 
    413434MANAGERS