I need some way to retrieve the language of a Calendar object, in order to e.g. encode it. I would like to add a constant for each cFOO class in Calendar.pmod/Language.pmod.
My wanted change in Calendar.pmod/Language.pmod looks like the following (shortened here since there are many small changes):
class cISO { constant name = "eng"; class cSWEDISH { constant name = "swe"; [...] class cLATVIAN { constant name ="lav"; class cLATVIAN_UNICODE { constant name ="lav"; class cSERBIAN { constant name ="srp"; class cSERBIAN_UNICODE { constant name ="srp";
So the following code will retrieve the ISO 639-2 string of the language the Calendar object is using the new property of the Language object:
Calendar.Minute m = Calendar.set_language("swe")->Minute(); string cal_name = m->language()->name; Calendar.Hour h = Calendar.set_language(cal_name)->Hour();
The default language will be "eng" on most systems.
Calendar.Second()->language()->name;
(4) Result: "eng"
Since I do not have cvs access, I can supply a diff file, it is done against latest 7.7 source snapshot.
What do you guys say?