开发者

Choose specific localization on an iPhone app

开发者 https://www.devze.com 2022-12-10 08:47 出处:网络
How can I let the user ch开发者_开发技巧oose a specific localization in my app? I have a book and I\'d like the users to be able to read all the different translations of it.You\'ll need to implement

How can I let the user ch开发者_开发技巧oose a specific localization in my app? I have a book and I'd like the users to be able to read all the different translations of it.


You'll need to implement your own localisation methods.

One way to do this is to subclass NSBundle and override -pathForResource:ofType:inDirectory:forLocalization: and -pathsForResourcesOfType:inDirectory:forLocalization:. In your overrides, read from NSUserDefaults or whatever to decide which localisation to use then manually find the right one.

0

精彩评论

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

关注公众号