how to do localization for iphone
i got button.... displays on button Search...
when i selected localization.....
i need to display
Zoeken
for search button its dis开发者_StackOverflow中文版plays Zoeken...
@All thanks in advance.
You should look at NSLocalizedStringWithDefaultValue
:
NSString *buttonTitle = NSLocalizedStringWithDefaultValue(@"KEY", nil, [NSBundle mainBundle], @"VISIBLE_DESCRIPTION", @"DEVELOPER_DESCRIPTION");
[aButton setTitle:buttonTitle forState:UIControlState...];
You'll then need to provide the relevant localization files in your project for the languages you intended on targeting.
As a top level skim, you can create per-locale NIB and string resource files using the built-in internationalisation capabilites.
However, this is quite a broad topic (there's an entire section of the Apple developer site dedicated entirely to internationalisation, complete with sample code, etc.), so what you need to do it read the documents there, look at the sample code and then ask a more targeted question if you get stuck/have a specific issue.
精彩评论