3
votes

My application's languages are English and German. I have localized my settings bundle to German.

One of my pages (int the Settings.app) includes topics. I have added them in the settings.bundle in an English alphabetical order (Topics.plist). I have Topics.strings which translates every topic to German. Of course the order of the topics remain as in English, which is not correct.

Is there a way to fix it?

EDIT: I need some way to read this plist into an array, sort it, and return it back to the settings.bundle. I am not sure if I can write directly to Settings.bundle.

The line:
BOOL success = [dict writeToFile:[[NSBundle mainBundle] pathForResource:@"Settings.bundle/Topics" ofType:@"plist"] atomically:YES];

This line returns YES on iPhone 4S 5.1.1 and NO on iPhone 5 6.0.2. I guess Apple fixed this in iOS6, am I correct?

Please help me solve my problem and make the topics in the Settings.bundle appear alphabetically sorted both in English and in German.

Thanks!

1
Anyone? Nobody has ever done this before?user-123

1 Answers

2
votes

When you load the topics from the bundle into an array, then sort them alphabetically before using them as the data source for your table. See this code for an example.