10.4: Change default languages for the Translation widget

Aug 14, '06 07:30:04AM

Contributed by: meall

I often use the Translation widget to translate from English to French, and the reverse. By default, when I choose English, it puts Chinese as the default translation to, and from French, it is Netherland. I had to change the translate to each time I changed languages.

So, I opened the /Library -> Widgets -> Translation.wdgt (control-click on it and choose Show Package Contents), and opened the Translation.js file in the Contents folder. At the begining of the file, there are a few var declarations for each language. So I selected the English declaration, and cut and paste the fr into the first position, and for French, I place en in first:

var English = [
    'fr',
    'zh-Hans',
    'zh-Hant',
    etc...
];
var French = ['en','nl','de','el','it','pt','es'];
Now when I switch the Translate From language menu to English or French, I always have the good Translate To language selected. That saves me lots of time in my day!

[robg adds: I always recommend copying the system widgets to your user's Library/Widgets folder before modifying them. The modified user-level widget will take precedence over the system widget, and you've automatically got a clean original in the original location.]

Comments (2)


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