Files
weewx/bin/user/extensions.py
Tom Keffer f205595715 Weewx now allows easier localization to non-English speaking locales.
In particular, set the environment variable LANG to your locale, and
then weewx date and number formatting will follow local conventions.
Details in a new section in the Customization Guide.
2013-09-10 20:19:17 +00:00

22 lines
579 B
Python

#
# Copyright (c) 2011 Tom Keffer <tkeffer@gmail.com>
#
# See the file LICENSE.txt for your full rights.
#
# $Revision$
# $Author$
# $Date$
#
"""User extensions module
This module is imported from the main executable, so anything put here will be
executed before anything else happens. This makes it a good place to put user
extensions.
"""
import locale
# This will use the locale specified by the environment variable 'LANG'
# Other options are possible. See:
# http://docs.python.org/2/library/locale.html#locale.setlocale
locale.setlocale(locale.LC_ALL, '')