Skip to content

Instantly share code, notes, and snippets.

@fethica
Created March 23, 2018 18:00
Show Gist options
  • Save fethica/2a25fa5ae317a7d22379bbd00c09f886 to your computer and use it in GitHub Desktop.
Save fethica/2a25fa5ae317a7d22379bbd00c09f886 to your computer and use it in GitHub Desktop.
Get the language name for code based on the user's device current language
let language = Locale.current.localizedString(forLanguageCode: "ar")
print(language) // Arabic (if the user's device language is English)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment