Re: [Evolution] Locale-dependent features
- From: Damon Chaplin <damon ximian com>
- To: Ilya Konstantinov <evolution-users future galanet net>
- Cc: Evolution <evolution ximian com>
- Subject: Re: [Evolution] Locale-dependent features
- Date: Mon, 12 Feb 2001 12:38:13 +0000
Ilya Konstantinov wrote:
On Sat, Feb 10, 2001 at 05:37:29PM +0000, Damon Chaplin wrote:
I can't see a way of determining which format is preferred in the
current locale. In strftime() I think you have to choose explicitly
- even with a LANG of en_US it uses 24-hour format for the preferred
time format "%X", when the preferred format is really 12-hour.
If we could figure this out then we could use it as the default setting.
Right. localeconv(1) allows you to fetch LOCALE-specific glibc settings
for your current LOCALE, including t_fmt, the time formatting string in
strftime() format. In 12-hour countries, it'll contain either "%i",
"%l" or "%r", while in 24-hour countries, it'll contain either "%H",
"%k", "%R" or "%T";
For example, /usr/share/i18n/locales/he_IL contains "%H:%M:%S" in
t_fmt (in a Unicode form), while en_US contains "%r" (which is a
12-hour time, according to strftime).
Unfortunately struct lconv doesn't have a "t_fmt" field on my system
(RedHat 6.2, glibc 2.1.3-15)
Damon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]