GNOME Bugzilla – Bug 135451
localize year in gtkcalendar.c
Last modified: 2005-06-12 07:00:06 UTC
Some countries (e.g. Thailand) uses non-Gregorian year. It would be nice if gtkcalendar.c uses localized year, just like it does on day-of-week and month. Also marking these strftime strings as a translatable would help.
What strftime formats do you talk about? I only see strftime used to extract the locale-dependent day and month names (no need to translate there) and to format the value for DND, where we certainly don't want to use translations, since it cause mean interoperability problems. Regarding localized years, do we need to display a string to denote the era that is used ? e.g. 100 BC.
About era string, that can leave it up to localizer. Some countries (like Japan) use eras which last 10-50 years, so era string carry significant information. Some countries (like Thailand) has only two eras (similar to BC, AD), and users can tell years displayed in localized era from BC years instantly, so era string can be omitted. For the year string to use in strftime, I guess Japaneses would prefer "%EY" while Thais would prefer "%Ey". So I suggest using strftime with P_("%y"), and leave it up to localizer to decide whether era string is needed. I guess you are right that month and day-of-week strftime strings don't need to be marked for translation.
(Note that I'd be very suprised if a localized was wanted for Japan. To the best of my knowledge, the use of eras for anything but ceremonial uses pretty much vanished after WWII.) Is localizing the date without a user preference right for Thailand? I assume that at least in some applications Western-style years are used extensively as well; does windows always use the localized year?
I don't recall seeing a Windows option to switch between the year formats. Anyway, I haven't touched Windows Thai Edition for a few years now, and don't have one to check, so don't take my word. In Thailand, virtually all printed publications and most webpages follow this rule of thumb: Thai text goes with Thai years; English text with Western years. GtkCalendar displays localized month and day-of-week text, so most Thais would expect to see localized years. If a Thai application prefers Western-style years, it would most likely also prefers English month names. Displaying Thai month names with Western years wouldn't cause confusion (it's 2547 v. 2004), but it looks a bit off.
Created attachment 33541 [details] [review] localize the year in gtkcalendar widget
It would be nice if this can be resolved in gtk 2.6.
2005-06-12 Matthias Clasen <mclasen@redhat.com> * gtk/gtkcalendar.c (calendar_paint_header): (gtk_calendar_size_request): Allow localization of the format in which the year is displayed. (#135451, Paisa Seeluangsawat)