Django

Code

Changeset 2046

Show
Ignore:
Timestamp:
01/18/06 07:01:43 (3 years ago)
Author:
hugo
Message:

added a note on what to do when app developers want to provide translations for languages where there is no django-provided base translation.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/i18n.txt

    r1850 r2046  
    448448 
    449449      .. _LANGUAGES setting: http://www.djangoproject.com/documentation/settings/#languages 
     450    * the LocaleMiddleware can only select languages for which there is a 
     451      django provided base translation. If you want to provide translations 
     452      for your application that aren't already in the set of translations 
     453      in Djangos source tree, you will want to at least provide basic 
     454      translations for that language. For example Django uses technical 
     455      message IDs to translate date formats and time formats - so you will 
     456      need at least those translations for the system to work correctly. 
     457 
     458      A good starting point is to just copy over the english ``.po`` file 
     459      and to translate at least the technical messages and maybe the validator 
     460      messages, too. 
     461       
     462      Technical message IDs are easily recognized by them being all upper case. 
     463      You don't translate the message ID as with other messages, you provide 
     464      the correct local variant on the provided english value. For example with 
     465      ``DATETIME_FORMAT`` (or ``DATE_FORMAT`` or ``TIME_FORMAT``), this would 
     466      be the format string that you want to use in your language.  The format 
     467      is identical to the ``now`` tag date formattings. 
    450468 
    451469Once ``LocaleMiddleware`` determines the user's preference, it makes this