Edgewall Software

Changes between Version 78 and Version 79 of 0.12/TracFaq


Ignore:
Timestamp:
Nov 5, 2004, 1:06:36 AM (20 years ago)
Author:
anonymous
Comment:

Added section about setting the locale for changing the date and time format

Legend:

Unmodified
Added
Removed
Modified
  • 0.12/TracFaq

    v78 v79  
    103103------------------------------------------------------------------
    104104With the `TracAdmin`:trac: command ''hotcopy''. See `TracBackup`:trac: for documentation, however this is not available in 0.7.1 but only in newer versions.
     105
     106How do I change the format used for displaying date and time?
     107------------------------------------------------------------------
     108You change the format by setting an appropriate 'locale' in the Apache config. You do this by adding
     109
     110::
     111
     112  SetEnv LC_TIME "xx_YY"
     113
     114right after the line where you set TRAC_ENV.
     115
     116:xx: The language code as defined in `ISO 639`_
     117:YY: The upper case, two letter country code as defined in `ISO 3166`_
     118
     119Examples: *de_DE* is Germany, *en_GB* in Great Britain end *fr_FR* is France
     120
     121**When it does not work**
     122
     123First, you should check, if the chosen locale is installed on the system at all. On Linux, you can use
     124
     125::
     126
     127  localedef --list-archive
     128
     129to list the installed locale definitions.
     130
     131If this is not the problem, then LC_TIME may be overridden by LC_ALL or LANGUAGE defined in the system environment. You may try one of them (LANGUAGE has highest priority) instead LC_TIME. Note that LC_TIME just affects the date and time display, whereas LC_ALL and LANGUAGE also affect handling of system messages, sorting and other country dependent output/input. So the conservative way is to stick to LC_TIME if possible.
     132
     133.. _`ISO 639`: ftp://ftp.ilog.fr/pub/Users/haible/utf8/ISO_639
     134.. _`ISO 3166`: ftp://ftp.ilog.fr/pub/Users/haible/utf8/ISO_3166
    105135
    106136--------