mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-14 05:52:47 +00:00
fix rtl detection
This commit is contained in:
parent
a0caa00a1d
commit
f19ffa54c9
1 changed files with 2 additions and 2 deletions
|
@ -168,8 +168,8 @@ object LocaleUtils {
|
|||
|
||||
@JvmStatic
|
||||
fun isRtlLanguage(locale: Locale): Boolean {
|
||||
val displayName = locale.displayName
|
||||
if (displayName.isEmpty()) return true
|
||||
val displayName = locale.getDisplayName(locale)
|
||||
if (displayName.isEmpty()) return false
|
||||
return when (Character.getDirectionality(displayName.codePointAt(0))) {
|
||||
Character.DIRECTIONALITY_RIGHT_TO_LEFT, Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC -> true
|
||||
else -> false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue