Dock Icons Emoticons Contact List Styles Message Styles Sound Sets AppleScripts Status Icons Service Icons Menu Bar Icons Plugins Miscellaneous All
Countdown: Multilingual with Precision Control

Countdown: Multilingual with Precision Control

Submitted By Jose Luis Benavente (joseluis)


It's an improvement of this Countdown script from itthe.
Added multiple languages and precision of output.

New features:
  • Support for multiple languages
  • Support for limit the precision of the output (weeks, days, hours, minutes)

Languages supported:
  • English (en)
  • Spanish (es)
  • German (de) (Thanks Dario!)
  • Dutch (nl) (Thanks Bor!)
  • French (fr) (Thanks biglittledragoon!)
  • Polish (pl) (Thanks Fire Crow!)
  • Swedish (sv) (Thanks Peter Pilnäs)

If someone wants his language supported, can modify the languages.plist file to add their strings (or you can send it to me, and I'll update the script)

The traditional method (%_countdown) looks for the system language as default; the %_cdlang accept any language.

  • Traditional Use
    • %_countdown{01/01/2010 00:00}: 145 weeks, 2 days, 12 hours, and 17 minutes (in your system language)
  • Multilanguage:
    • %_cdlang{01/01/2010 00:00, en}: 145 weeks, 2 days, 12 hours, and 17 minutes (in English)
    • %_cdlang{01/01/2010 00:00, es}: 145 semanas, 2 días, 12 horas, y 17 minutos (in Spanish)
    • %_cdlang{01/01/2010 00:00, de}: 145 Wochen, 2 Tage, 12 Stunden, und 17 Minuten (in German)
    • %_cdlang{01/01/2010 00:00, nl}: 145 weken, 2 dagen, 12 uur, en 17 minuten (in Dutch)
    • %_cdlang{01/01/2010 00:00, fr}: 145 semaines, 2 jours, 12 heures, et 17 minutes (in French)
    • %_cdlang{01/01/2010 00:00, pl}: 145 tygodni, 2 dni, 12 godzin, i 16 minut (in Polish)
    • %_cdlang{01/01/2010 00:00, sv}: 145 veckor, 2 dagar, 12 timmar, och 16 minuter (in Swedish)
  • Precision of output (in your system language):
    • %_cdformat{15/12/2007 18:30,wdhm}: 145 weeks, 2 days, 12 hours, and 17 minutes
    • %_cdformat{01/01/2010 00:00,wdh}: 145 weeks, 2 days, and 12 hours
    • %_cdformat{01/01/2010 00:00,wd}: 145 weeks and 2 days
    • %_cdformat{01/01/2010 00:00,d}: 1017 days
    • %_cdformat{01/01/2010 00:00,hm}: 24420 hours and 15 minutes
    • %_cdformat{01/01/2010 00:00,m}: 1465215 minutes
  • Precision of output with multilanguage:
    • %_cdlangformat{10/10/2010 00:00, en, wm}: 145 weeks and 3615 minutes
    • %_cdlangformat{10/10/2010 00:00, es, hm}: 24420 horas y 14 minutos


A little fix for Snow Leopard.


You can reply to individual comments by clicking the "Reply" link next to each.

# by FireCrow on 12/25/07 at 22:30:12

Hiya! I don't know how to write those scripts, but multilingual one is awesome idea! If u wanna add Polish, I can try to help!

# by pablos93 on 09/11/09 at 17:02:52

I think the script needs to be upgraded to work with Snow Leopard, I tried to make it work but I just got the "some time" error :S

# by evands on 09/16/09 at 00:23:24

Version 0.6 fixes Snow Leopard support

# by fanatic on 07/05/11 at 18:22:24

%_cdlangformat does not work, the result is always "some time" (with language being English and end time being in the future).

When comparing the scripts for each "command" I noticed that in the script for %_cdlangformat the quoted form of end_time is being returned instead of end_time itself. After changing this in the script %_cdlangformat now works as expected for me.

Hope this helps :-)

Post a New Comment

You must be logged in to post comments.

Install | Download
30.03kb (664 downloads)

3.30 / 8 votes
Current Version: 0.6
Last Updated: 09/12/09