private fun Locale.getProperDisplayName(): String { val displayName = this.displayName.capitalize(Locale.getDefault()) if (displayName.equals(this.toString(), ignoreCase = true)) { return LocaleViewHolder.LOCALE_TO_DISPLAY_ENGLISH_NAME_MAP[this.toString()] ?: displayName } return displayName }
Returns the locale in the selected language, with fallback to English name