localizable.strings

using different string files in android

て烟熏妆下的殇ゞ 提交于 2019-12-05 07:02:38
I'm porting my iPhone app to android and I'm having a problem with the string files now. The app is a translation tool and users can switch the languages, so all the localized strings are in both languages and they are independent from what locale the OS is running. For iOS version I have different files like de.strings, en.strings and fr.strings and so on. For every target with specified language pair I read the strings from the string tables, e.g. for de-fr I will include de.strings and fr.strings in project and set the name of the string tables in the info-list file and read strings from

Localizable.strings error - compiler says file is missing

混江龙づ霸主 提交于 2019-12-05 04:57:38
I tried adding a Localizable.strings file and add some strings to test with, everything works fine. However, when I try to add a localization things starts to get weird. I am able to add a localization (english and russian) and I can see in finder that the files are listed in the two folders; ru.lproj and en.lproj. When I clean and build I get the following compilation error: Copy .strings file Error The file "Localizable.strings" couldn't be opened because there is no such file. Fixed it by a push in the right direction from this link provided by tiguero in the comment. I looked further into

Xcode warning: The specified input encoding is Unicode (UTF-8), but file contents appear to be Unicode (UTF-16); treating as Unicode (UTF-16)

巧了我就是萌 提交于 2019-12-04 23:55:09
I create the .strings file by using genstrings command. Output file of this command encoded with UTF-16, but when i add generated .strings file to my project and then bild, Xcode show warning: The specified input encoding is Unicode (UTF-8), but file contents appear to be Unicode (UTF-16); treating as Unicode (UTF-16). I open .strings file in textEdit.app and resave it with UTF-16, but this haven't effect. Hot to fix this? Thaks! I could not reproduce the problem, but the easiest solution is probably to select the strings file in Xcode and set the "Text Encoding" to "UTF-16" in the File

Override a base localizable.strings file

谁说我不能喝 提交于 2019-12-04 15:43:17
问题 Is there a way to have one base localizable.strings file for multiple targets within a project, and also have a second localizable.string file for each target that will override and append individual values to the base file? EDIT I want my app to have two .strings files - Localizable.string and Override.strings. If a string, Title.Welcome, is not found in OverrideLocalizable.strings then I would like the app to search Localizable.strings for Title.Welcome. Essentially, specifying Localizable

iOS Localizable.strings file for XIB files?

淺唱寂寞╮ 提交于 2019-12-03 02:24:21
I'm translating an iOS project into Portuguese and I've created a pt.lproj/Localizable.strings file, and I've added NSLocalizedString() into the source code. It all works! With one slight problem - the strings within XIB files don't get translated... I know this is by design though. I've seen that the ibtool command can be used to rip strings from an XIB file called x and put it into a file called x.strings... but my question is, is there a way to pull the strings from ALL the xib files and put them all into one .strings file (e.g. Localizable.strings? or even another one called XIBs.strings

NSLocalizedString shows raw key instead of loading a string from another language

爱⌒轻易说出口 提交于 2019-12-01 05:18:43
问题 I'm having trouble using NSLocalizedString(key, comment: "") to load strings from Localizable.strings when the key is missing for the current language. NSLocalizedString returns a raw key For instance, when string is present for English localization, but is missing for Russian: "config.updating" = "Update in progress..."; Calling NSLocalizedString when iOS language set to Russian returns "config.updating" NSLocalizedString("config.updating", comment: "") // "config.updating" Shouldn't

Is there a way to invalidate NSBundle localization cache, withour restarting application? [iOS]

耗尽温柔 提交于 2019-11-30 21:25:39
Let's assume that we can change in runtime Localizable.strings, that is placed in NSBundle At the current moment, even if we change it's contents, NSLocalizedString would return old(cached) values. Run Application Get LocalizableString for specific key1 <- value1 Change Localizable.strings key1 = value2 <-- Do something in application to invalidate Localization cache --> Check if LocalizableString for specific key1 == value2 What I've already tried: [[NSBundble mainBundle] invalidateResourceCache] [UIApplication _performMemoryWarning] Tried to see, if there's some dictionaries. used for

Localize Localizable.strings with Xcode 4.5 [duplicate]

百般思念 提交于 2019-11-30 12:22:49
Possible Duplicate: Localization - Add additional language to localizable.strings file With Xcode 4.5 SDK iOS 6.0, I cannot add localization to Localizable.strings file. In Xcode 4.4.1- under the list of all added languages was a "+" to add other languages. But in Xcode 4.5 I can't see it and I can't add any other languages apart the default English. Someone has resolved this problem ? Thanks ! If you select your top level project file in the Project Navigator, and then in the area on the right select your project under "PROJECT" and more to the right click the "Info" pane, there is a part

NSBundle - (not loaded yet) Error

血红的双手。 提交于 2019-11-30 05:39:39
问题 I am trying to get a strings file table for use with NSLocalizedStringFromTableInBundle. I am using this method: +(NSBundle*)getBundleForLang:(NSString*)lang{ //get the path to the bundle NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"localizable" ofType:@"strings" inDirectory:nil forLocalization:lang]; NSLog(@"bundlePath = %@",bundlePath); //load the bundle NSBundle *langBundle = [[NSBundle alloc] initWithPath:[bundlePath stringByDeletingLastPathComponent]]; NSLog(@

Localizing Dynamic Plural Noun messages (e.g. “5 Items Processed”) on iPhone using Objective-C

不问归期 提交于 2019-11-29 19:20:30
In my current app, I have code that displays a message, e.g. "5 Items Processed." To keep the phrase grammatically correct, i.e. whether or not it should be "5 Item" or "5 Items," I use the following code: int numItems = 5; NSString *myString = [[NSString alloc] initWithFormat:@"%d Item%@ Processed", numItems, (numItems == 1 ? @"" : @"s")]; This works fine for now. But I'm localizing my app, and want to make sure that the text is grammatically correct in all the languages I am translating the app into. I could do something like this: int numItems = 5; NSString *myString = (numItems == 1 ?