Use translation language, not country
This commit is contained in:
parent
b6d7655b6d
commit
b65db8d42f
|
@ -137,7 +137,7 @@ extension CreditsViewController {
|
|||
guard let author = AppConstants.Translations.authorByLanguage[lang] else {
|
||||
fatalError("Author not found for language \(lang)")
|
||||
}
|
||||
cell.leftText = Utils.localizedCountry(lang)
|
||||
cell.leftText = Utils.localizedLanguage(lang)
|
||||
cell.rightText = author
|
||||
cell.accessoryType = .none
|
||||
cell.isTappable = false
|
||||
|
|
|
@ -138,6 +138,10 @@ public class Utils {
|
|||
return String(format: format, locale: Locale.current)
|
||||
}
|
||||
|
||||
public static func localizedLanguage(_ code: String) -> String? {
|
||||
return Locale.current.localizedString(forLanguageCode: code)
|
||||
}
|
||||
|
||||
private init() {
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue