- EventTypeSpec applicationEventTypes[] = {
- {kEventClassApplication, kEventAppActivated },
- {kEventClassApplication, kEventAppDeactivated }
- };
-
- EventHandlerUPP ehUPP = NewEventHandlerUPP (application_event_handler);
+ /* the gettext manual is potentially misleading about the utility of
+ LANGUAGE. It notes that if LANGUAGE is set to include a dialect/region-free
+ language code, like "it", it will assume that you mean the main
+ dialect (e.g. "it_IT"). But in reality, it doesn't bother looking for
+ locale dirs with the full name, only the short code (it doesn't
+ know any better).
+
+ Since Apple's preferred language list only consists of short language codes,
+ if we set LANGUAGE then gettext will not look for the relevant long-form
+ variants.
+ */
+
+ /* how to get language preferences with CoreFoundation
+ */
+
+ NSArray* languages = [[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLanguages"];