Matching months as words in foreign languages

From your noodle to other noodles. Talk about ways to get the most from Hazel. Even exchange recipes for the cool rules you've thought up. DO NOT POST YOUR QUESTIONS HERE.

Moderators: Mr_Noodle, Moderators

Because it took me some time digging through this forum, I thought I'd share the knowledge here. This applies to Hazel 4.0.2, but probably also to version 3.x.
Just to be complete: this is tested on El Capitan, 10.11.5.

I prefer to have my operating system in English, while my native language is Dutch. So I process a lot of Dutch documents with Dutch dates.

Problem 1: you want to match a date in a file where the month is written in words AND is in a different language than English. E.g.

EN: 12 March 2016
NL: 12 maart 2016

You can still match the date with a Custom Date variable where you choose the month name written in full in English (December). So in this case you would match with [day: 2 positions] [month: December] [year: 4 digits]

To allow Hazel to match the Dutch version, you need to add Dutch as a preferred language in System Preferences > Language & Region > Preferred Languages.

You can then use the date variable in e.g. the name of the file in any pattern you'd like.

Problem 2: you matched a date in a file and want to use it with the month in letters in a different language than English. E.g. you want to match 2016-03-05 and use it as 2016-maa-05 (in Dutch).

To allow Hazel to use the Dutch version of the month names, you need to set Dutch as the format language in System Preferences > Language & Region > Advanced > General > Format language.
Posts: 16
Joined: Sat Aug 11, 2012 10:47 am

Many thanks, just had to solve exactly this problem. Your post saved me a lot of time and grief.
Posts: 109
Joined: Tue Jul 10, 2012 4:56 pm

Return to Tips & Tricks - DO NOT POST QUESTIONS