[fpc-pascal] SysLocale.PriLangID vs Mac OS X localization
Bent Normann Olsen
bent at earmaster.com
Mon Jun 23 12:00:17 CEST 2008
> var
> langArray: CFArrayRef;
> begin
>
> langArray
> :=CFArrayRef(CFPreferencesCopyAppValue(CFSTR('AppleLanguages'),
> kCFPreferencesCurrentApplication))
> end;
>
> Then use CFArrayGetCount to get the number of elements in the array,
> CFArrayGetValueAtIndex to get the actual values (they are CFStrings).
> And keep in mind those are not canonical names (as mentioned in the
> last link, you may want to call
> CFLocaleCreateCanonicalLanguageIdentifierFromString() to get the
> canonical name; although you'll have to import this function manually,
> as it does not yet exist in MacOSAll)
>
>
> Jonas
Thanks Jonas, that did the trick ;-)
Preferable we will work on a more clean Mac OS X friendly release of our
application on the next version, but to get the existing code working we
need this.
Thanks,
Normann
More information about the fpc-pascal
mailing list