How to get the current device language in iOS swift and objective C?

Solution:

You can get the device language like(English,french) using the below code.

Objective C:


        NSString *language = [[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0];

Swift:


        let language = Bundle.main.preferredLocalizations.first as! NSString

Comments

  1. Strange "water hack" burns 2 lbs in your sleep

    Over 160,000 men and women are losing weight with a easy and SECRET "liquid hack" to drop 1-2 lbs each night as they sleep.

    It's painless and works on anybody.

    Here's how to do it yourself:

    1) Take a glass and fill it with water half full

    2) Proceed to follow this weight losing hack

    and you'll become 1-2 lbs thinner as soon as tomorrow!

    ReplyDelete

Post a Comment

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

store cgpoint in userdefaults iOS swift