This is a function defined in the Foundation Framework. It returns a localized version of a string.
Questions tagged [nslocalizedstring]
410 questions
1
vote
2 answers
NSLocalizedString works on simulator but not on device
I'm having trouble getting NSLocalizedString to work on my iPad device. I have no problems what so ever on my simulator, if I change language all goes to plan.
But when I run it on my device, I'm getting this messages:
Localizable string "Current"…

the Reverend
- 12,305
- 10
- 66
- 121
1
vote
1 answer
Why is my app not picking up the text in the Localizable.strings file?
I'm trying to localise my iPhone app, and I've tried to Google for help and look on here but I can't find anything that I am doing incorrectly.
I have created a Localizable.strings file, which currently only contains:
/*
Localizable.strings
…

jowie
- 8,028
- 8
- 55
- 94
1
vote
0 answers
SIGSEGV when getting string from NSLocalizedStringFromTable
I am getting a strange crash sometimes when getting a string from NSLocalizedStringFromTable. Here is the relevant section of my crash's stacktrace:
CoreFoundation 0x33c4b7f7 CFEqual 98
CoreFoundation …

Jason
- 14,517
- 25
- 92
- 153
1
vote
0 answers
Localize constants not updating properly even after relaunch app?
I have app level language change option (English & Greek) in my app settings irrespective of device language.
App default language is English.
When I change the app language into Greek and re-launch the app some of the strings are not changing into…

Naresh
- 16,698
- 6
- 112
- 113
1
vote
2 answers
NSLocalizedString with empty comment?
i found this good example to use NSLocalizedString : What is the second parameter of NSLocalizedString()?
NSLocalizedString(@"Save",@"Title of the Save button in the theme saving dialog");
.
/* Title of the Save button in the theme saving dialog…

Paul
- 6,108
- 14
- 72
- 128
1
vote
1 answer
UIPasteboard showing Paste keyword in English language
In my app when I tried to open UIPasteboard after copying text it's showing Paste text in the English language. While other option texts are in Japanese!
It's not same behavior for all device. In some device, it's showing text ペースト
Does anyone…

kb920
- 3,039
- 2
- 33
- 44
1
vote
2 answers
How to localize some strings from a HTML file that is displayed in a UIWebView controller under iOS?
I am looking for a way that would allow me to localize some strings from inside a HTML file that is displayed in a UIWebView under iOS.
I want to use NSLocalizesString() for doing the localization, so I am looking for a simple solution that would…

sorin
- 161,544
- 178
- 535
- 806
1
vote
0 answers
Change my Settings language
I'm now translating my app. I've already translated every view and data inside the app but I've also some settings for the app in the Settings menu of the iPad. All of them are in Spanish and I would like to translate them depending of the language…

Alex
- 481
- 1
- 5
- 19
1
vote
1 answer
How to find all available Strings-Tables in iOS project?
Is it possible to find all localization tables which are available in a iOS Project?
Background:
In a Swift based iOS project I am using multiple, localized .strings files. For example one file containing common strings used in different project,…

Andrei Herford
- 17,570
- 19
- 91
- 225
1
vote
1 answer
How can I check the values of NSLocalizedString in multiple locales?
Our iOS app is translated into 19 languages, and recently I found an issue where two buttons on a screen had the same title - which mean that users couldn't tell which to press!
I want to write a unit test that will check two NSLocalizedString keys…

bryanjclark
- 6,247
- 2
- 35
- 68
1
vote
1 answer
Changing the device language when application is in background
I am running my iPod touch application and then go in background and change the device language from Settings application and try to bring that application on foreground. My application gets restarted and I do not land on the screen where I left the…

Abhinav
- 37,684
- 43
- 191
- 309
1
vote
2 answers
NSLocalizedString Problem- Localization of a variable that holds a string
//Viewcontroller.m code
NSLocalizedString(@"attributes",@"Attribute Name")
//Localizable.string code
"attributes"="attributes-french";
This method works great for localization of @"attributes"
Now what should be the code if I want to use a…

chits12345
- 11
- 2
1
vote
1 answer
How to change the language and update content programatically inside the application, not from phone? IOS swift 4
I'm trying to build an app, from where user can select the language and i want to change the content of whole application. For example i have two labels and two languages english and german. two files of Localizable (en , de). on my screen user…

Aqib Javed
- 103
- 13
1
vote
1 answer
Loss of ios swift application text after publishing to app store following internationalization
first post and lone spare time programmer here. In short i internationalised my app by adding translations for french and Spanish and it tested without issue on simulator and Iphone 6 (version 12.4.6), there are no errors or app crashes.
When i…

RunningMan
- 91
- 5
1
vote
0 answers
Enumerate through localised array in all localisations
I'd like to check whether an array of localised strings in any localisation contains a string.
let myItem = "thisItem"
let items: [String] = [/*several strings*/]
var localisedItems: [String] {
return items.map { NSLocalizedString($0,…

nontomatic
- 2,003
- 2
- 24
- 38