This is a function defined in the Foundation Framework. It returns a localized version of a string.
Questions tagged [nslocalizedstring]
410 questions
3
votes
4 answers
I want to use urdu language as content in iOS App development.
I am planning to make an app which will contain urdu and arabic text.
I dont want to use images for urdu language text, so I want to integrate some sort of urdu text Api.
Can anyone please let me know, that how I use urdu text in ios application in…

Rukhsar Manzoor
- 31
- 1
- 4
3
votes
4 answers
Get the index of a parameter in a NSLocalizedString
This is my NSLocalizedString:
"YOUR_INFO" = "%i is the first number, %i the second and %i the third";
Later on, i'm using this string like this:
NSString *detailString = [NSString stringWithFormat:NSLocalizedString(@"YOUR_INFO", nil), firstVal,…

Sr.Richie
- 5,680
- 5
- 38
- 62
3
votes
1 answer
NSLocalizedStringFromTable not working in CocoaPod dependency
I've installed REActivityViewController as a pod. Here's the picture of the Resourcesfolder in the pod:
And here's one of the lines trying to pull the strings:
[_cancelButton setTitle:NSLocalizedStringFromTable(@"button.cancel",…

OdieO
- 6,836
- 7
- 56
- 88
3
votes
2 answers
NSLocalizedStringFromTable doesn't work
I'm trying to use NSLocalizedStringFromTable but with no results. I've got created Profile.strings file, clicked localized, in project settings I add Polish and English languages, so my file has 2 "files" inside and I typed the same strings with…

Tomasz Szulc
- 4,217
- 4
- 43
- 79
3
votes
2 answers
Static NSLocalizedString
After checking a number of topics, I still can't figure something out : what is the (best?) way to use static NSLocalizedString, i.e. to statically allocate a NSLocalizedString and access it easily.
Ideally, I would want to do something like that…

Bertrand Caron
- 2,525
- 2
- 22
- 49
3
votes
1 answer
iOS - Best practice of localizing
I've build an iOS application, and translated the application to English and Swedish.
The problem I'm facing is that one word in English can have two different meaning (translations) in Swedish. So now I have the English word as the key and value.
I…

Carnal
- 21,744
- 6
- 60
- 75
3
votes
2 answers
NSLocalizedString is it really working?
I misunderstand NSLocalizedString.
I have a project with French and English .strings files.
In project target - Localizations I have 6 files in French and English.
In english.strings file:
"hello" = "world";
In french.strings file:
"hello" =…
user1056113
3
votes
1 answer
How to get localized city and country names for timezone name
How can I get city name and country name from timezone?
For example, I can see all knownTimeZoneNames array, and I want to show in labels "Europe/Moscow" as "Moscow, Russia" in few languages. How can I get this strings?
Actually I need localized…

Ascoron
- 49
- 3
3
votes
1 answer
NSLocalizedStringFromTableInBundle : not getting values for key
I am not able to get values for keys from the InfoPlist.
label.text = NSLocalizedStringFromTableInBundle(@"keyone",
nil,
AppDelegateObj.langBundle,…

Dev
- 3,885
- 10
- 39
- 65
3
votes
2 answers
Xcode - Localizable.strings working only in English
I'm trying to get my localizable.strings working properly, but I can't figure out how. My storyboard is localizable too, and works: all buttons and view controllers are shown rightly, in both languages.
But my NSLocalizedStrings loaded…

Gui Del Frate
- 671
- 1
- 7
- 17
3
votes
2 answers
Ios Localization not working
I have XCode Version 4.3.3 running and iOS 5.1.
i can do what i want. i can't get localization running. i added different languages through project files. I adjusted the InfoPlist.strings in every Language like this:
"key" = "value";
I have…

NewYearsEve
- 157
- 2
- 11
2
votes
4 answers
genstrings does not work with macro for NSLocalizedString
I would like to shorten "NSLocalizedString" to "_" so I'm using macro
_(x) NSLocalizedString(@x, @__FILE__)
.
But now, when I want to generate strings for localization with
find . -name \*.m | xargs genstrings
it generates nothing.
Any help?

user500
- 4,519
- 6
- 43
- 56
2
votes
1 answer
localizable.strings adding new strings
When localizing my apps I use genstrings -o en.lproj *.m to create the initial Localizable.strings file and translate it. So far so good.
The problem arises when the app changes and some of the former NSLocalizableStrings change, get deleted or new…

user387184
- 10,953
- 12
- 77
- 147
2
votes
1 answer
Static NSLocalizedString causes "one-time initialization function" crash only on iOS16
We usually define NSLocalizedString as static variables in a String extension such as:
extension String {
static let text = NSLocalizedString("text_key", tableName: "Translations", value: "text", comment:"")
}
Then we have some classes that…

CRoig
- 691
- 5
- 24
2
votes
1 answer
"localizedStringWithFormat" change the language without restarting the app
I successfully implemented plural localization in my app. But if I change the app language, localizedStringWithFormat still returns the plural in previous language.
If I restart the app, the plural will be returned in correct language (the language…

Pixeelix
- 46
- 4