Translate cal's weekdays into other languages

Jun 17, '03 10:09:00AM

Contributed by: gdurr

If your preferred language is other than English, you'd probably like to have the cal command in you own language. To do this, replace the English name of the days using a sed expression, and include it in an alias in your .tcshrc file. For French, it is:

alias cal "cal | sed 's/ S  M Tu  W Th  F  S/Di Lu Ma Me Je Ve Sa/'"
Now when you run cal, you'll actually be running the alias, and it will replace the English dates with your language's versions.

Comments (9)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20030615091356873