Skip to content

Commit

Permalink
Change language Function Not working On Antox application. #491
Browse files Browse the repository at this point in the history
  • Loading branch information
askymore committed Jan 8, 2019
1 parent b96eb70 commit c8d7096
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ object AntoxLocalization {
}
else {
val locale = if (localeString.contains("_")) {
val (language, country) = localeString.splitAt(localeString.indexOf("_"))
new Locale(language, country)
val lc = localeString.split("_")
new Locale(lc(0), lc(1))
} else {
new Locale(localeString)
}
Expand Down

1 comment on commit c8d7096

@askymore
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when the localeString contains "_" ,the result of splitAt() is incorrect. The second string still contains the"_"

Please sign in to comment.