[fpc-pascal] SysLocale.PriLangID vs Mac OS X localization

Marco van de Voort marcov at stack.nl
Sat Jun 21 13:21:36 CEST 2008


> I've been working with CFBundle unit to try and figure how to get
> information about language settings, and so far with no luck. I've read
> about how Mac OS X works with internationalization, which automates language
> processing, but this is "no can do" for me, or I just can't get the right
> information.
> 
> All I need is to retrieve a kind of ID for a users language setting, in the
> same way as we would do in Win32 environment with Syslocale and PriLangID.
> 
> Any ideas of how to retrieve these kinds of information for Mac OS X?
> 
> I'm using FPC 2.2.0 and Lazarus 0.9.25 (15279) on i386/Darwin/Carbon.

Aside from Jonas' remarks,  FPC 2.2.2 comes with a locale unit that loads
the constants in sysutils with the system's locale settings when you include
it. I verified, and it is also enabled for Darwin. 

Note that it doesn't allow to load arbitary locale settings.


In addition to Jonas remarks, it is better to stick to generally used ISO
locale designations rather than some arbitrary enumeration on Windows.



More information about the fpc-pascal mailing list