Based on the locale I need to find what is the first day of the week (Sunday/Monday) In JAVA I would do:
Calendar FR_cal = Calendar.getInstance(Locale.FRANCE
This functionality seems to be missing from the python standard library up to and including (at least) Python 3.1.2.
Some clues:
Since information about this is usually stored along with the systems l10n data (in the GNU world that would be the locale def's likely in /usr/share/i18n/locales/
) my first reaction was to use something like locale.nl_langinfo(), but unfortunately there is nothing like locale.FIRST_WEEKDAY
in the locale module :-(
Aside from the Babel lib mention by aaronasterling, I found this example of a solution for the named problem used inside a GNOME applet. Also worth noting is the accompanying blog post.