MagiCal Feature Request

4 Votes

Make date format aware of international settings

  • Status: Reviewed

Description

I am running a German OS X and it bugs me that I am unable to set MagiCal to show me the correct day and month format. Can't you just intercept the right format from the International settings? That would be the icing on an already perfect cake.

Submitted by AlexK at 08:43am on 29 Mar 2007

Updates

MagiCal actually does automatically set the date format for some localisations, though not currently for German as I'm not certain what the standard date format is for Germany.

It's possible to set the date format to whatever you like though - you're not restricted to the options in the drop-down, just type in whatever format you want.

If you let me know which format you are using, I'll set this as the default format for German localisations in the next release.

I'll also investigate whether it's possible to automatically detect the system date format settings.

Posted by Nick at 10:34am on 29 Mar 2007

Hi Nick, thanks for the fast reply.
I am sorry, I think my explanation was not very precise. What I meant is that instead of March and Thursday I'd like to see my local words - Mrz and Donnerstag. The formatting itself is fine.

Greetings,
Alex

Posted by AlexK at 11:14am on 29 Mar 2007

Ah, I see. The application has been translated into German, but you will need to run your OS in German in order for MagiCal to use that localisation.

If you go to System Preferences/International and set "Deutsch" as the topmost language, then restart or log out, MagiCal will use German day and month names.

Posted by Nick at 2:00pm on 29 Mar 2007

Ah, I try to avoid that actually. German translations of menus are horrible to look at. Maybe I am a lonely case, but my system is set to run in English, but my keyboard, datetime and currency settings run in German.

My quirkyness might be a bit much to cope with. :)

Posted by AlexK at 2:47pm on 29 Mar 2007

I'm an american, but at times I do the same thing... english OS, but German date/time (i like to pretend that the year of german classes I took in college actually meant something. :-p)

Setting language in the preferences would be cool... objectpark's fuzzyclock http://www.objectpark.org/fuzzyclock.html has this functionality, but they don't have near the customizability of MagiCal... not to mention the awesome "now you see it, now you don't" calendar viewer.

Maybe you can get guido to give you his multi-language date/time library? fc hasn't had an official release in almost three years, after all...

Brad

Posted by Brad at 4:49pm on 29 Mar 2007

This seems a fair enough request. It's not completely trivial because the standard Apple localisation system doesn't work this way, so I'll have to write my own, but that can be done.

In the meantime, there's a simple hack you can use to achieve this effect. Right click on the MagiCal application and select "Show Package Contents". Navigate to Contents/Resources/ and you will find multiple language folders.

If you are using American English as your system language, and wish to use German for MagiCal, rename the en.lproj folder to something else, then rename the de.lproj folder to en.lproj. If you are using British English, do the same thing but with the en_GB.lproj folder. Ditto for other languages.

Posted by Nick at 9:00pm on 29 Mar 2007

That is actually an awesome solution. A little bit geeky and fully funtional - exactly my kind of thing. :)

Thanks Nick for the quick and friendly response. You just grabbed yourself another longtime user. MagiCal rocks big time!! :D

Posted by AlexK at 07:15am on 30 Mar 2007

Another "little bit geeky and fully functional" way to do it is to enter the following in a Terminal window:
defaults write com.charcoaldesign.magical AppleLanguages '(de)'

To bring it back, you can use:
defaults write com.charcoaldesign.magical AppleLanguages '("en-US")'

(adapted from this page: http://www.macosxhints.com/article.php?story=20061001065101830 )

Posted by Brad at 7:00pm on 03 Apr 2007

Hey... nice tip. I didn't realise that functionality existed, but using it I should be able to add this option to the preferences.

Posted by Nick at 9:49pm on 03 Apr 2007

If you implement it officially, you should probably do something to directly modify ~/Library/Preferences/com.charcoaldesign.magical.plist rather than make "defaults write" do it for you.

By the way, to make this work you have to restart the program. In fact, I've only done the modification while the program isn't running; I have no idea if it'll hold if you make the change while MagiCal is already active.

Posted by Brad at 11:22pm on 03 Apr 2007

Well yes, of course. But the file you are referring to *is* the MagiCal preferences file. I already read and write directly to that file every time a preference is set within MagiCal.

In fact the option you've discovered effectively already is a preference - there's just no GUI for it within the program at the moment.

And no, it won't work while MagiCal is running. The language constants are loaded at launch time, so I can't change that without rolling my own system. But it sounds like this will be good enough.

Unless you'd like to make a compelling case for why you might want to switch languages frequently without having to relaunch MagiCal...?

Posted by Nick at 11:35pm on 03 Apr 2007

Well, I wasn't expecting it to be able to *change the display* while MagiCal runs; I was just wondering if the program would "refresh the prefs file" when it quit and erase changes made while it was running (like Firefox does with pref.js). But since you say you modify that file on every preference change I'm sure that won't be an issue. /me is a sysadmin-in-training and a scripter, so Cocoa programming is entirely over my head (at least for now).

I'm sure you'll be able to add a button to automatically quit and re-launch MagiCal after making a language change, anyway...

(By the way, your MAPTCHA on this forum is almost always the same...)

Posted by Brad at 11:45pm on 03 Apr 2007

If you change the MagiCal preferences using the command line while it is running, and then modify the prefs from within MagiCal itself, the command line change will be overwritten. This isn't an issue if you make the change while MagiCal is not running, nor would it be a problem if MagiCal modified the file by itself, since its own internal preferences would be in sync with the file.

MagiCal isn't written in Cocoa by the way, it's made with REALbasic (sound of shocked gasps from the audience). I believe this would work the same for any Cocoa app though.

The MAPTCHA question is based on your IP address, hence it will always be the same for you if you have a static IP. If you were to hard code a spam bot with the correct answer I'd just ban anyone at that IP from posting.

Posted by Nick at 12:02am on 04 Apr 2007

Nice discussion I tipped off. :)
Great to see it is an implementation that was already there sort of).

Posted by AlexK at 05:14am on 04 Apr 2007

Excellent idea

Posted by scameron728 at 9:23pm on 23 Apr 2007

I use International english as system language, and prefer local language (Danish) in my clock and date.
I suggest that the language in MagiCal is similar to the region chosen in "formats", in International prefs.
or.. even better: Magical includes an laguage/regions list in its own prefs.

Henrik Oehlers
Denmark

Posted by Henrik Oehlers at 11:39am on 06 Aug 2007

Vote

Add More Information

(optional)

(optional, will not appear on report)

What is twenty-two plus ten?
(MAPTCHA)