Index: Pyblosxom/pyblosxom.py
===================================================================
--- Pyblosxom/pyblosxom.py	(revision 929)
+++ Pyblosxom/pyblosxom.py	(working copy)
@@ -22,6 +22,7 @@
 import re
 import sys
 import os.path
+import locale 
 import cgi
 try: 
     from cStringIO import StringIO
@@ -82,6 +83,12 @@
         pyhttp = self._request.getHttp()
         config = self._request.getConfiguration()
 
+        # Initialize the locale, if wanted (will silently fail if locale is not
+        # available)
+        if config.get('locale'):
+            try: locale.setlocale(locale.LC_ALL, config['locale'])
+            except locale.Error: pass
+
         # initialize the tools module
         tools.initialize(config)
 
@@ -887,11 +894,18 @@
     mtime_gmtuple = time.gmtime(mtime)
 
     data["latest_date"] = time.strftime('%a, %d %b %Y', mtime_tuple)
+
+    # Make sure we get proper 'English' dates when using standards
+    loc = locale.getlocale(locale.LC_ALL)
+    locale.setlocale(locale.LC_ALL, 'C')
+
     data["latest_w3cdate"] = time.strftime('%Y-%m-%dT%H:%M:%SZ', 
                                            mtime_gmtuple)
     data['latest_rfc822date'] = time.strftime('%a, %d %b %Y %H:%M GMT', 
                                               mtime_gmtuple)
 
+    locale.setlocale(locale.LC_ALL, loc)
+
     # we pass the request with the entry_list through the prepare callback
     # giving everyone a chance to transform the data.  the request is
     # modified in place.
Index: Pyblosxom/tools.py
===================================================================
--- Pyblosxom/tools.py	(revision 929)
+++ Pyblosxom/tools.py	(working copy)
@@ -28,6 +28,7 @@
 import time
 import os.path
 import sys
+import locale
 import urllib
 
 try:
@@ -39,30 +40,10 @@
 # Pyblosxom imports
 import plugin_utils
 
-month2num = { 'nil' : '00',
-              'Jan' : '01',
-              'Feb' : '02',
-              'Mar' : '03',
-              'Apr' : '04',
-              'May' : '05',
-              'Jun' : '06',
-              'Jul' : '07',
-              'Aug' : '08',
-              'Sep' : '09',
-              'Oct' : '10',
-              'Nov' : '11',
-              'Dec' : '12'}
+month2num = None
+num2month = None
+MONTHS    = None
 
-# This is not python 2.1 compatible (Nifty though)
-# num2month = dict(zip(month2num.itervalues(), month2num))
-num2month = {}
-for month_abbr, month_num in month2num.items():
-    num2month[month_num] = month_abbr
-    num2month[int(month_num)] = month_abbr
-
-# all the valid month possibilities
-MONTHS = num2month.keys() + month2num.keys()
-
 # regular expression for detection and substituion of variables.
 VAR_REGEXP = re.compile(ur'(?<!\\)\$((?:\w|\-|::\w)+(?:\(.*?(?<!\\)\))?)')
 
@@ -79,6 +60,34 @@
     global _config
     _config = config
 
+    # Month names tend to differ with locale
+    global month2num
+    month2num = { 'nil' : '00',
+                  locale.nl_langinfo(locale.ABMON_1) : '01',
+                  locale.nl_langinfo(locale.ABMON_2) : '02',
+                  locale.nl_langinfo(locale.ABMON_3) : '03',
+                  locale.nl_langinfo(locale.ABMON_4) : '04',
+                  locale.nl_langinfo(locale.ABMON_5) : '05',
+                  locale.nl_langinfo(locale.ABMON_6) : '06',
+                  locale.nl_langinfo(locale.ABMON_7) : '07',
+                  locale.nl_langinfo(locale.ABMON_8) : '08',
+                  locale.nl_langinfo(locale.ABMON_9) : '09',
+                  locale.nl_langinfo(locale.ABMON_10) : '10',
+                  locale.nl_langinfo(locale.ABMON_11) : '11',
+                  locale.nl_langinfo(locale.ABMON_12) : '12'}
+    
+    # This is not python 2.1 compatible (Nifty though)
+    # num2month = dict(zip(month2num.itervalues(), month2num))
+    global num2month
+    num2month = {}
+    for month_abbr, month_num in month2num.items():
+        num2month[month_num] = month_abbr
+        num2month[int(month_num)] = month_abbr
+    
+    # all the valid month possibilities
+    global MONTHS
+    MONTHS = num2month.keys() + month2num.keys()
+
 def cleanup():
     """
     Cleanup the tools module.
Index: Pyblosxom/entries/base.py
===================================================================
--- Pyblosxom/entries/base.py	(revision 929)
+++ Pyblosxom/entries/base.py	(working copy)
@@ -21,6 +21,7 @@
 __revision__ = "$Revision$"
 
 import time
+import locale
 from Pyblosxom import tools
 
 BIGNUM = 2000000000
@@ -203,12 +204,18 @@
         self['dw'] = time.strftime('%A', timetuple)
         self['yr'] = time.strftime('%Y', timetuple)
         self['fulltime'] = time.strftime('%Y%m%d%H%M%S', timetuple)
+        
+        self['date'] = time.strftime('%a, %d %b %Y', timetuple)
 
+        loc = locale.getlocale(locale.LC_ALL)
+        locale.setlocale(locale.LC_ALL, 'C')
+
         # YYYY-MM-DDThh:mm:ssZ
         self['w3cdate'] = time.strftime('%Y-%m-%dT%H:%M:%SZ', gmtimetuple)
         self['rfc822date'] = time.strftime('%a, %d %b %Y %H:%M GMT', \
                                            gmtimetuple)
-        self['date'] = time.strftime('%a, %d %b %Y', timetuple)
+        
+        locale.setlocale(locale.LC_ALL, loc)
 
     def __getitem__(self, key, default=None):
         """
Index: web/config.py
===================================================================
--- web/config.py	(revision 929)
+++ web/config.py	(working copy)
@@ -8,6 +8,11 @@
 # directory.
 #py["codebase"] = "/path/to/pyblosxom/installation"
 
+# What's the locale for the blog?
+# This affects things like the format of dates, etc.
+# Not required, but if you enter one, be sure it's valid for your system. 
+#py["locale"] = "nl_NL.UTF-8"
+
 # What's this blog's title?
 py['blog_title'] = "Another pyblosxom blog"
 
