Questions tagged [nslocalizedstring]

This is a function defined in the Foundation Framework. It returns a localized version of a string.

410 questions
3
votes
0 answers

Use array of strings as argument for pluralization in .stringsdict

We're trying to make a typing indicator that displays one or two names depending on how many people are typing at a time. So the use cases are: Person1 is typing Person1 and Person2 are typing Several people are typing I know it's possible to pass…
rhpekarek
  • 167
  • 9
3
votes
1 answer

Localization in Xcode 10

I have an app where all the user facing strings use NSLocalizableString(). I've never localized an app so I watched WWDC 2018 video New Localization Workflows in Xcode 10. From there I created a new project, a Single View App. Base localization is…
Murray Sagal
  • 8,454
  • 4
  • 47
  • 48
3
votes
1 answer

multilanguage plural localization

I'm implementing localization in my iOS application and I got stuck with plural forms. I have two languages in my application. When I've created Localizable.strings files they got language assigned to them so each file has one language. Now when I…
3
votes
1 answer

How to change Button font size in localization condition with Swift 3

I have two language versions(English, Chinese) in my app. I would like to change button language text into these languages when user click on "Change Language" button. For example, btnLogOut.setTitle(NSLocalizedString("Logout", comment: ""), for:…
May Phyu
  • 895
  • 3
  • 23
  • 47
3
votes
2 answers

Invalid Siri Support - Warning iTunes Connect

I'm integrate SiriKit in my app for ride a book but after send my app to TestFlight I get a mail response with the next warnings. Invalid Siri Support - No example phrase was provided for INGetRideStatusIntent in the "en-CO" language Invalid Siri…
kakashy
  • 714
  • 9
  • 24
3
votes
1 answer

Error on localizedStringWithFormat

I'm trying to localize my app, but the app crashes when it encounters my localized strings, that use localizedStringWithFormat. Here's an example: cell.productRangeLabel.text = String.localizedStringWithFormat(NSLocalizedString("Questions %s",…
coopersita
  • 5,011
  • 3
  • 27
  • 48
3
votes
2 answers

Autolayout RTL support in app

I am aware that iOS has the RTL (right to left) support for languages, and that by using leading and trailing constraints I "tell" autolayout to stack the elements according to the language orientation. This all works great. If I want a constraint…
zevonja
  • 193
  • 1
  • 14
3
votes
2 answers

iPhone app using different language than the one set in OS / device?

Is it possible to have my app running in a different language than the one that is set in the OS? I want to have a language switch in my app’s setting menu, where the user can e.g. select german for the app, while his system is running in…
pawi
  • 123
  • 1
  • 5
3
votes
2 answers

How to localise the numbers in iOS?

I did following to localise the strings. I wrote the following in .strings file: "Hello"="Hello"; and in french , .strings file: "Hello"="bonjour"; and I change the label as : self.myLabel.text = NSLocalizedString(@"Hello", nil); I am…
ZeeroCool77
  • 191
  • 1
  • 13
3
votes
1 answer

NSLocalizedString for Cocoapods

I have a project in Swift and it uses a few languages (3 at the moment). I added them using "Localizations" tab in Project tab. Then I'd use Editor -> Export for Localization.. to generate an Xliff file which would contain all the NSLocalized…
kernelpanic
  • 2,876
  • 3
  • 34
  • 58
3
votes
2 answers

NSLocalizedString gives other language then phone is in

My project base language is English. My simulator/phone is in English. The projects supports English, French, Dutch. When the app starts for the first time the app is always in French even when the phone is in English. When I debug and print out…
user1007522
  • 7,858
  • 17
  • 69
  • 113
3
votes
2 answers

iOS Push Notifications Localization

I would like to know what is the default behaviour of silent push notifications when the app is on foreground. Will it still display an alert view or not? When localising the alert message : "alert" : { "body" : "Start the game Jenna" …
3
votes
3 answers

Is there a simple way to put NSLocalizedStrings in an array using swift?

I want to add an array of localized strings as datasource for a collection view in a swift application. I have written this : let text = [NSLocalizedString("s0",comment: ""),NSLocalizedString("s1",comment: ""),NSLocalizedString("s2",comment:…
eeschimosu
  • 633
  • 2
  • 10
  • 24
3
votes
1 answer

Danish localization broken in iOS 8?

I've seen other threads about the simulator, but I'm experiencing a 90% break which is nothing short of miraculous. Our app is localized in 5 languages. All of them work perfectly, except Danish. Only certain words are translated, even though all of…
swebal
  • 431
  • 3
  • 14
3
votes
1 answer

How to obtain localized string for a number with custom number format?

I'm using NSNumberFormatter.localizedStringFromNumber(aDouble, numberStyle: .DecimalStyle) to display a number to the end user. This works well, unless the number has many digits after the decimal. For example, if aDouble is 0.123, the generated…
Jordan H
  • 52,571
  • 37
  • 201
  • 351