Re: Localized questions
Re: Localized questions
- Subject: Re: Localized questions
- From: Markus Hitter <email@hidden>
- Date: Sat, 26 Jan 2002 13:24:03 +0100
Am Samstag den, 26. Januar 2002, um 03:37, schrieb K.K.Chan:
Hello,
After my program have been tested in Europe and other places, I
realize what a different world is out there. Here is my
questions,
1) How do I display right time & date format with right
separator, set in the System Preference ? For example in
dd/mm/yy or yy-mm-dd.
Add a localized Interface. Should work without change. Perhaps,
your App loads the wrong language. Use
NSLog(@"User Defaults (NSLanguageDomainName): %@",
[[[NSUserDefaults standardUserDefaults]
dictionaryRepresentation]
objectForKey:@"NSLanguageDomainName"]);
to check.
If you want special formatting, you even can add a formatter in
your interface to always get the localized variant.
2) Is it possible to retrieve separator character (decimal or
thousand) or currency symbol under Cocoa?
should be answered above. As a last resort, you could dig
manually into User Defaults.
3) What is the best approach in localizing Cocoa program ?
Use localized interfaces ("NIB files"). How to add, see Project
Builder help. For the few occasions you need a string outside an
interface, there's the localized strings mechanism. Vermont
Recipes handles them.
Hope that helps,
Markus
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/