Tuesday, April 19, 2016

Use a different region notation than the system's region notation

Leave a Comment

On iOS, an app can use a different language than the system language if the developer passes the NSLocale to the right instances, or else if the proper values are written to NSUserDefault's AppleLanguages key.

I don't seem to find a way to do this also for the region, the part that takes care of number formatting.

The use case here is that I want a UITextfield's DecimalPad keyboard to show a comma for a decimal no matter what the system's region is set to.

Is this possible?

1 Answers

Answers 1

You can use AppleLocale instead of AppleLanguages.

E.g. -AppleLocale nl_BE will set the locale to Dutch with region Belgium.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment