Hi,
I too find it a bit sad that pcal doesn't use locale strings. Using it
is really easy:
- #include <locale.h> and <langinfo.h>
- At the beginning of the program, call setlocale(LC_ALL,""); for
initializing locales according to environment variabls.
- Replace months_ml[output_languag][mm-1] by nl_langinfo(months[mm-1])
where months is defined by
nl_item *months [12] = { MON_1, MON_2, MON_3, MON_4, MON_5, MON_6,
MON_7, MON_8, MON_9, MON_10, MON_11, MON_12 };
(no, MON_* items may not be consecutive, so you really need an array
for being portable).
- Same with days_ml[][] and DAY_1, DAY_2, ...
- Same with days_ml_short[][] and ABDAY_1, ABDAY_2, ...
- Same with lang_id[] and nl_langinfo(_NL_IDENTIFICATION_LANGUAGE);
- Same with lang_mapping[] and nl_langinfo(CODESET);
Feel free to ask for anything I forgot.
Regards,
Samuel
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]