Re: Localized questions
Re: Localized questions
- Subject: Re: Localized questions
- From: Carlos Weber <email@hidden>
- Date: Sat, 26 Jan 2002 07:31:31 -1000
On Saturday, January 26, 2002, at 02:24 , Markus Hitter wrote:
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.
Apple's advice on this subject is at
http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ProgrammingTopics/
Internationalization/index.html