Ticket #41576: testlocale.c
File testlocale.c, 362 bytes (added by ryandesign (Ryan Carsten Schmidt), 11 years ago) |
---|
Line | |
---|---|
1 | /* |
2 | testlocale.c |
3 | by Ryan Schmidt |
4 | BSD license |
5 | |
6 | Compile this with: |
7 | cc testlocale.c -framework CoreFoundation -o testlocale |
8 | Run it with: |
9 | ./testlocale |
10 | */ |
11 | |
12 | #include <CoreFoundation/CoreFoundation.h> |
13 | |
14 | int main() { |
15 | CFLocaleRef locale = CFLocaleCopyCurrent(); |
16 | CFShow(locale); |
17 | CFTypeRef country = CFLocaleGetValue(locale, kCFLocaleCountryCode); |
18 | CFShow(country); |
19 | } |