我正在创建一个iPad应用程序,我有一个Localizable.strings
文件,该文件是英文和荷兰文:
"failed to copy file" = "Failed to copy file";
"failed to copy defaultFeeds.plist" = "Failed to copy defaultFeeds.plist form the application's bundle to the device's documents directory for this app. Please make sure the device has space available on the flash memory. Please push the home button, connect your device to iTunes and check how much space there is available. Remove things you don't need and try again. If the problem presists, please contact us. You can find our support page in the App Store in iTunes.";
"failed to copy file" = "Bestand kopieëren mislukt";
"failed to copy defaultFeeds.plist" = "Het kopieëren van defaultFeeds.plist van de applicatiebundel naar de documenten map van het apperaat is mislukt. Ga alstublieft na of het apparaat ruimte heeft op het flash geheugen. Druk op de Home-knop, verbind het apparaat met iTunes en controleer hoeveel ruimte er beschikbaar is. Verwijder dingen die je niet nodig hebt en probeer het opnieuw. Als de problemen voortzetten, kunt u contact met ons opnemen. U kunt onze support-page vinden in de App Store in iTunes.";
当我注释掉错误检查时,我确实得到错误,我得到英文版,虽然iPhone模拟器的语言设置为荷兰语:
// Copy defaultFeeds if run for the first time
//if(![[NSFileManager defaultManager] fileExistsAtPath:FEEDS_PLIST_IN_CURRENT_APP_DIRECTORY_PATH]) {
// if(!) is for handling errors
//if(![[NSFileManager defaultManager] copyItemAtPath:[[NSBundle mainBundle] pathForResource:@"defaultFeeds" ofType:@"plist"] toPath:FEEDS_PLIST_IN_CURRENT_APP_DIRECTORY_PATH error:nil]) {
UIAlertView *copyFailedAlertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"failed to copy file", @"failed to copy file") message:NSLocalizedString(@"failed to copy defaultFeeds.plist", @"failed to copy defaultFeeds.plist") delegate:nil cancelButtonTitle:nil otherButtonTitles:nil];
[copyFailedAlertView show];
[copyFailedAlertView release];
//}
//}
此外,调试器说:
There is no HW layout for this input mode, defaulting to US
任何人都可以帮助我吗?感谢。
答案 0 :(得分:0)
您是否通过Xcode4界面创建了Localizable.strings文件?
'旧式'命名(English.lproj,Dutch.lproj)已被标准格式(en.lproj,nl.lproj)取代。选择'Localizable.strings'文件并在右侧帮助UI:
看看是否会改变你的任何内容。