From cf76ba048e9d07d4af2c584807cefa926e10e9ff Mon Sep 17 00:00:00 2001 From: shah Date: Fri, 22 Nov 2024 12:29:08 +0530 Subject: [PATCH] fix: Portuguese and Chinese map language change not working bug fix ALS-1889 --- .../main/java/com/aws/amazonlocation/utils/MapHelper.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/aws/amazonlocation/utils/MapHelper.kt b/app/src/main/java/com/aws/amazonlocation/utils/MapHelper.kt index 3ba0426c..c9615deb 100644 --- a/app/src/main/java/com/aws/amazonlocation/utils/MapHelper.kt +++ b/app/src/main/java/com/aws/amazonlocation/utils/MapHelper.kt @@ -1523,7 +1523,12 @@ class MapHelper( } private fun setStyleLanguage(style: Style) { - val languageCode = getLanguageCode() + var languageCode = getLanguageCode() + if (languageCode != null) { + if (languageCode.contains("-")) { + languageCode = languageCode.split("-")[0] + } + } val expression: Expression? = Expression.coalesce( Expression.get("name:$languageCode"), Expression.get("name:en"),