This is a function defined in the Foundation Framework. It returns a localized version of a string.
Questions tagged [nslocalizedstring]
410 questions
2
votes
0 answers
Validate if all NSLocalizedString are in their proper Localized.string?
I have an app available in 3 languages.
Is there a way to be sure all NSLocalizedString are in their proper Localized.string?
In other word, how did you manage\be sure all string are in all Localised.string. (for project with dozen of language, can…

Franck
- 8,939
- 8
- 39
- 57
2
votes
2 answers
Hyperlink with %@ not working on iOS
so I have the following link in my Localizable.strings file:
someURL = "https://www.thisisthelink.be/api/article?categoryId=%@&key=ehhssd%bfbfs43-53456Gdffd~563&lang=nl&amount=1000&mobile=true";
The part where there is the %@ I need to fill in the…

SoundShock
- 485
- 1
- 3
- 24
2
votes
1 answer
Exporting xliff file on Xcode acting strangely
So I have a project that has been already localized in the past. But we created some new keys and we want to get them translated seperately.
Also in some languages some keys are missing, so I wanted to find those too. So what I did was to export the…

Yannis P.
- 811
- 1
- 11
- 32
2
votes
2 answers
pros and cons of NSLocalizedString without comment
What are the advantages and disadvantages of creating following function in a project:
@warn_unused_result
public func NSLocalizedString(key: String) -> String {
return NSLocalizedString(key)
}
Mostly, we fill NSLocalizedString like this:…

Daniel
- 20,420
- 10
- 92
- 149
2
votes
1 answer
Using ".stringsdict" file with 'localizedStringWithFormat' --> Are NUMERALS localized for you?
I am trying to produce the following localized string:
"In ___ day(s)" --> (ex: In 5 days)
To accomplish this, I've gone down the .stringsdict route:
In %d Days
NSStringLocalizedFormatKey
…
user1661421
2
votes
1 answer
How to change xib with localized language in iOS
How can I change my app language as I am using xibs in my project.
/* Class = "UILabel"; text = "Clients"; ObjectID = "22E-Bc-4Af"; */
"22E-Bc-4Af.text" = "Klienci";
/* Class = "UILabel"; text = "Messages"; ObjectID = "5y0-E0-aXx";…

PAn Kaj Khatri
- 539
- 1
- 6
- 22
2
votes
1 answer
Does Apple provide localized recovery options for common NSButton title's for NSError's?
Does Apple provide localized strings for common NSButton titles, such as the equivalents to OK, Cancel, Try Again, and Quit?
I'm attempting to create a custom NSError object from one handed to me by another Cocoa framework. I want to implement the…

Dave
- 12,408
- 12
- 64
- 67
2
votes
6 answers
Localization failed to read a strings file (Xcode 6.3.2)
I can't export for localization, I just get a "Localization failed to read a strings file" error.
The system log says:
2015-06-07 01:41:48,305 Xcode[1914]: [MT] DVTAssertions: Warning in…

Andreas
- 2,665
- 2
- 29
- 38
2
votes
2 answers
Have different fallback language than the keys used in NSLocalizedString(@"Text aka. key",@"Description")
I use everywhere NSLocalizedString(@"Text in deutsch",@"das Textfeld Text in deutsch")
I have two Localizable.strings files. One for german and one for english.
What I realized now is.
If you have a german iPhone, you get the german text, if you…

Allisone
- 8,434
- 4
- 32
- 54
2
votes
0 answers
SiriSpeechErrorDomain log message when entering an empty dictation message in UITextView
I've noticed that throughout our app whenever we use the dictation button on the keyboard to enter text in a UITextView and then press done without saying anything the following two lines appear in our logs:
!!!…

alexgophermix
- 4,189
- 5
- 32
- 59
2
votes
3 answers
NSLocalizedString with variable in Swift
How can I translate a string that has a variable in it like this:
let alert = UIAlertController(title: NSLocalizedString("NEUEARTIKEL",comment:"Bitte gib einen neuen Artikel für \(titelArr[sender.tag]) an:"), message: nil, preferredStyle:…

Seb
- 983
- 1
- 11
- 26
2
votes
1 answer
Swift NSLocalizedString practical use
I couldn't understand and find any sources that showed me the practical use of NSLocalizedString. Even Apple documentation..
NSLocalizedString(<#key: String#>, tableName: <#String?#>,
bundle: <#NSBundle#>, value: <#String#>, comment:…

Esqarrouth
- 38,543
- 21
- 161
- 168
2
votes
0 answers
How to dynamically load .strings files for localisation of UIStoryboard for multi lang support
Hi everyone i'm working on localisation part for my app with UIStoryboard, instead of creating the .strings file inside the app through Xcode .
I wanted to be load the .strings files from the server and use it for the uistoryboard for the…

Madhu
- 869
- 1
- 17
- 37
2
votes
1 answer
Changing locale on the fly
I want to change localization on the press of a button in my app
i have read this and this
I am changing my locale from english to hebrew and vice versa (LTR language to RTL language)
my layout is designed in such a way that it uses constraints from…

Lena Bru
- 13,521
- 11
- 61
- 126
2
votes
0 answers
iOS: changing system language doesn't affect the app
I've got a real pain with my current project which has few Localizable.strings files and the problem is that the language doesn't change when user change it in system settings - NSLocalizedString macros continues to return previous language strings.…

heximal
- 10,327
- 5
- 46
- 69