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
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
4 answers
Get Currency Symbol based on Country code or Country name using NSLocale
I want to display Currency Symbol based on Country name or country code using NSLocale I have all the country name list. suppose I have selected USA then it Return $ Currency
Code :
NSLocale *locale = [NSLocale currentLocale];
NSString…

Rushabh
- 3,208
- 5
- 28
- 51
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
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 detect correctly language user of device objective-c?
I have a query about iOS. I want to detect language of my device, for change any texts in my app if language is english and other if isn't english. But when I detect language, always detect region and not detect language. In others words if I go to…

user3739367
- 4,161
- 6
- 20
- 18
3
votes
2 answers
iOS8 - Get country names from locale
I'm using this code to get the list of countries:
for (NSString *code in [NSLocale ISOCountryCodes])
{
NSString *identifier = [NSLocale localeIdentifierFromComponents:@{NSLocaleCountryCode: code}];
NSString *countryName = [[NSLocale…

user623396
- 1,537
- 1
- 17
- 39
3
votes
4 answers
Correct in app-purchasing local currency symbol
With in app purchasing I want the local currency symbol to obviously suit the users local currency. Is it safe to use NSLocaleCurrencySymbol as the main source of detection of where the user is. Heres part of my code:
NSLocale *theLocale =…

pete
- 2,980
- 4
- 22
- 34
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
1 answer
How to display correct Swedish currency on IOS?
I wrote the code below to display given price with a Swedish currency:
+(NSString *) getPriceStringWithCurrencySymbolFor:(NSNumber *)price{
NSDictionary *components = [NSDictionary dictionaryWithObject:@"sv_SE" forKey:NSLocaleCurrencyCode];
…

Burak
- 5,706
- 20
- 70
- 110
3
votes
1 answer
How to determine programmatically if current locale uses AM/PM or 24h format for time?
I have a 24h formatted time string like 13:30 which I must translate into a 12h time format string when the user's locale uses AM/PM. How can I detect that reliably?

openfrog
- 40,201
- 65
- 225
- 373
3
votes
2 answers
How to refresh the NSLocale in iPhone?
I am currently working in iPhone application, Using NSLocale to get the current Currency symbol working fine, but when i press home button the app goes to background process and i change the Currency (Setting>>International>>Regionformat>>Like…

SampathKumar
- 2,525
- 8
- 47
- 82
2
votes
1 answer
NSLocale setPreferredLanguage
I seem to be going in circles around this problem and I am heading no where now.
I am trying to force the language of my app (to swedish) as shown below.
@autoreleasepool {
[[NSUserDefaults standardUserDefaults] setObject:[NSArray…

Neelesh
- 3,673
- 8
- 47
- 78
2
votes
1 answer
MonoTouch CurrentUICulture
When I change the Language of the emulator or the device this change is not reflected in neither Thread.CurrentUICulture nor CultureInfo.CurrentUICulture. Is this by design?

Oliver Weichhold
- 10,259
- 5
- 45
- 87
2
votes
2 answers
NSLocale in united states?
I am using NSLocale to detect what country my user is right now in.
When i want to check if the user is inside the United States
NSLocale *locale = [NSLocale currentLocale];
NSString *countryCode = [locale objectForKey: NSLocaleCountryCode];
if…

orthehelper
- 4,009
- 10
- 40
- 67
2
votes
1 answer
Get users countrycode (ISO 3166-1) in MonoTouch
I see that the NSLocale bindings aren't complete in MonoTouch so I am having a bit difficulties writing them myself.
Does anyone have the code to get the users countrycode in ISO 3166-1 alpha 3 format? Three letters for each country:…

Christer Nordvik
- 2,518
- 3
- 35
- 52