Locales encapsulate information about linguistic, cultural, and technological conventions and standards. Examples of information encapsulated by a locale include the symbol used for the decimal separator in numbers and the way dates are formatted. Locales are typically used to provide, format, and interpret information about and according to the user’s customs and preferences. They are frequently used in conjunction with formatters.
Questions tagged [nslocale]
257 questions
0
votes
1 answer
stringByReplacingOccurrencesOfString not working perfectly for Arabic numbers
Its not replacing comma, in case of Arabic language.
NSString *strAfterReplacingComma = @"٢٠٠٫٠٠";//100.00
NSString *strAfterReplacing = [strAfterReplacingComma stringByReplacingOccurrencesOfString:@"," withString:@"."];
NSLog(@"%@",…

Prajnaranjan Das
- 1,378
- 1
- 9
- 26
0
votes
1 answer
Is there a way to change the locale/language on an iOS Simulator through code?
I was searching for a way to change the iOS device Locale without having to go through the settings and importing some new framework. Just a simple script or so would be great, or even a piece of code. I was wondering if there was something like :…

gran_profaci
- 8,087
- 15
- 66
- 99
0
votes
1 answer
How can I set my iOS device to have a locale of "en" instead of "en_US"?
According to this question here:
Looking for a list of all available languages in iOS
There are numerous locales that have only a language code with no region code. Can anyone explain to me how to set my device into a state whereby the value of…

esilver
- 27,713
- 23
- 122
- 168
0
votes
1 answer
How to get knownTimeZoneNames according to currentLocale
I want to create a list of knownTimeZoneNames automatically translated in the language of the user.
I have this code for countries which works very well, but I can't succeed in do it for knowntimeZoneNames.
NSLocale *localeTwo = [NSLocale…

Jean-Baptiste Choisy
- 11
- 2
0
votes
1 answer
Get Time Format (AM/PM or 24hrs) from Current Calendar / Locale
I want to create my custom time format, but I need to know if the user's system preferences want 24 hour or AM/PM format. I've looked through NSCalendar and NSLocale but could not find it.
***UPDATE
Since the other question does not explicitly let…

the Reverend
- 12,305
- 10
- 66
- 121
0
votes
1 answer
iOS get locale based description of number
Not sure if this is possible, but for my app I would like to get a locale based string that describes a number.
For example, if I had the number 10,000,000.
In english, I would expect the phrase "Ten Million". However, in Hindi, it would be One…

Jameo
- 4,507
- 8
- 40
- 66
0
votes
2 answers
how to update the device language whenever user changed it
Currently im getting the current device language by this code:
NSString * language = [[NSLocale preferredLanguages] objectAtIndex:0];
Now I need to update this language whenever the user change to other language in device by…

Rey_mysterio
- 81
- 1
- 3
- 14
0
votes
2 answers
Unable to convert string date with GMT for Nsdate
I have a string like a below example
2013-12-28T8:15:00+03:00
but i want to convert to NSDate with same format here is my code
NSDateFormatter *dateFormatterInBoundSegment = [[NSDateFormatter alloc] init];
[dateFormatterInBoundSegment…

wod
- 812
- 1
- 10
- 23
0
votes
1 answer
Forcing NSLocalizedString to change Language - not Working
I want to Refer :
Change iOS app's language on the fly first, in which a way to change Language is Given, i used it, it is working, but it requires Two ReLaunch of Application to take changes over Application.
I want to do something in which, just…

Mrug
- 4,963
- 2
- 31
- 53
0
votes
1 answer
Abbrev. (words) for "year", "month" and so on from Locale
I try to print a time period with format like this :
"2 years, 3 months, 15 days, 23 hours, 15 min and 35 sec".
I want to use these date/time abbrev (words) for another purposes too ...
Is it possible to get abbrev for "years", "months" and so on…

Bino
- 1
- 1
0
votes
1 answer
Is that possible to print NSLocale currency in ios?
Iam looking for a code that can display the NSLocale currency format.
I used below codes
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init] ;
[formatter setNumberStyle:NSNumberFormatterCurrencyStyle];
[formatter…

Navi
- 1,696
- 2
- 17
- 36
0
votes
1 answer
locale detect objective-c
I am working in localizing and app in objective-c and would like to know if there's a way to detect what is the language of the phone.
More specifically, when the end user goes to Settings->General->International->Language a language is chosen so…

Tripon
- 81
- 1
- 10
0
votes
1 answer
iOS NSString - Creating upper case based on locale
My iOS application has language selection option.
Its a server based application that receives all the strings from server that are to be displayed in the app.
In one of the view, i've to convert text to "upper case", for that I'm using NSString's…

Satyam
- 15,493
- 31
- 131
- 244
0
votes
1 answer
Nslocalization for iOS 6
I have 3 to set languages in my project. So when user select one language of my 3 language application works in that specific language. I have tried to use Nslocalization but not found any solution. I have Xcode 4.5. Can anyone give me a solution?

sharmaravi
- 137
- 3
- 13
0
votes
2 answers
how to use nsdateformatter to Venezuela
I'm trying to schedule a date on the calendar, which has a start time and an end time, everything works fine if the time zone is in the U.S., and the date the change does not help and I need it to Venezuela what should I do as I place generica, to…

Laurxs Sepeda
- 25
- 2