localizable.strings

Does iOS Look for Region-Specific .lproj Directory (e.g. en_US.lproj)?

久未见 提交于 2019-12-23 21:15:51
问题 According to the official document Internationalization Programming Topics: if your Mac app had localizations for United States, Great Britain, and Australian users, the bundle routines would search the appropriate region directory (en_US.lproj, en_GB.lproj, or en_AU.lproj) first, followed by the en.lproj directory. The same application on the iPhone would look only in the en.lproj directory. But I tried to put my Localizable.strings in en_US.lproj directory, not en.lproj, I still can find

how to force an ios app to use a certain localization?

夙愿已清 提交于 2019-12-23 19:38:50
问题 i have an app that have two localizations (hebrew and english), and i've been asked to cancel the english localization so that whatever your device's language, the app will be the same (but save the localization for future use). the localization is via Localizable.strings and also Xib localization (allot of them). is there a way to tell the app to always use a certain localization and ignore the device language? thanks ! 回答1: in that case just set the defaults key AppleLanguages EARLY at

Parse Cocoapod breaks localization

一世执手 提交于 2019-12-23 18:04:15
问题 In an iOS project, I've updated this morning my pods to add a new one. The Parse iOS SDK also got updated in the process, and it seems like it broke my app's localization. Now, when I try to call NSLocalizedString(@"A_LOCALIZED_STRING", nil) , I always get @"A_LOCALIZED_STRING" in return. Even if I use the longer version of NSLocalizedString with a specific bundle (here, [NSBundle mainBundle] ), I get the same results. I've noticed that the only string that gets localized properly is the

Localizable.strings error - compiler says file is missing

大憨熊 提交于 2019-12-22 05:06: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. 回答1: Fixed

iOS Localizable.strings file for XIB files?

最后都变了- 提交于 2019-12-20 12:20:11
问题 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

Adding strings localization files from a server

廉价感情. 提交于 2019-12-18 11:49:39
问题 We are building an application with dynamic data that we wish to localize. We know how to localize strings in iOS and Android but in this case the data will be downloaded dynamically from the server so we will need to download the localization files dynamically. Usually we store the strings files inside language folders. how can we do that when the file is coming from the server? 回答1: how can we do that when the file is coming from the server? You can't because the app bundle is not writable

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

不问归期 提交于 2019-12-18 10:01:25
问题 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

iOS Localizable.strings not being retrieved from BASE file

怎甘沉沦 提交于 2019-12-18 07:18:50
问题 I am having a problem getting localization on iOS to work the way I think it is suppose to, but this is my first foray into localization so maybe I am misunderstanding. I have three Localizable.strings files: Base "TAB_TITLE_Camera" = "CAMERA"; English "TAB_TITLE_Camera" = "Camera"; Spanish "TAB_TITLE_Camera" = "Cámara"; NSLocalizedString(@"TAB_TITLE_Camera", nil) iOS 6.1 On Xcode 5 with a 4th generation iPod Touch running iOS 6.1 , English and Spanish seem to work, but if I change to German

How Can I set Localised Direction within application?(RTL if user select arabic, LTR is selected language is English)

十年热恋 提交于 2019-12-17 17:38:08
问题 My Application must support Arabic(right to left direction) and English(left to right direction) language, I need to set UI and based on user select language from my application. I will implement UI with NSLayoutConstraint so it can update UI automatically, based on leading and trailing constraints. Now My Question is how can i achieve this? As My device language is say English and from my application user select Arabic(limited to my app only), So my Flow,UI,Animations etc should be right to

NSLocalizedString only retrieves the key, not the value in Localizable.strings (IOS)

孤街浪徒 提交于 2019-12-17 15:53:24
问题 I've made a strings file named "Localizable.strings" and added two languages to it, like so: "CONNECTIONERROR" = "Check that you have a working internet connection."; "CONNECTIONERRORTITLE" = "Network error"; I have also converted the files to Unicode UTF-8 However, when I create a UIAlertView like this: UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"CONNECTIONERRORITLE",nil) message:NSLocalizedString(@"CONNECTIONERROR",nil) delegate:self cancelButtonTitle:@"Ok"