I live in Thunder Bay, Ontario, and for years ever since Apple came out with Dashboard I had to put up with having to use either Toronto or Ottawa as my world clock city. Finally, after having enough of putting up with Toronto, I decided to investigate if it was possible to add your own cities to the list of World Clock cities. And yes, it is possible, since widgets are just HTML and Javascript files. Here’s how I added Thunder Bay:
- Open the World Clock widget package by finding it in Finder. It’s located in /Library/Widgets/World Clock. Right (or ctrl-click on it) and select Show Package Contents.
- Open the file WorldClock.js, search for Toronto (or whatever city makes alphabetical sense), and before Toronto add this line:
{city:'Thunder Bay', offset:-240, timezone:'Canada/Eastern', id:"6166142"},You can change the city name, and timezone to be whatever city and timezone you want. The ID field–to be honest I’m not sure if it has to be set to this–comes from Geonames.org. On Geonames, search for your city, select it (make sure you pick the one listed as a place), and click on the CSV link on the bottom. Open the CSV file and you’ll be able to find the ID of your city.
- Finally, open the file English.lprog (or whatever language you use) and open the file localizedStrings.js. Add this line before Toronto (or whatever city makes alphabetical sense):
localizedCityNames['Thunder Bay'] = 'Thunder Bay';
Now save all the files and add a new instance of the World Clock widget. You’ll now be able to choose Thunder Bay, or whichever city you chose to add.
{ 0 comments }
