开发者

how to do localization for iphone

开发者 https://www.devze.com 2023-02-06 01:00 出处:网络
i got button.... displays on button Search... when i selected localization..... i need to display Zoeken

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消