diff --git a/packages/smooth_app/lib/data_models/tagline/tagline_json.dart b/packages/smooth_app/lib/data_models/tagline/tagline_json.dart index 4fced2ae96f1..79741e08e974 100644 --- a/packages/smooth_app/lib/data_models/tagline/tagline_json.dart +++ b/packages/smooth_app/lib/data_models/tagline/tagline_json.dart @@ -97,9 +97,13 @@ class _TagLineItemNewsItem { if (_translations.containsKey(locale)) { translation = _translations[locale]; } else if (locale.contains('_')) { - final String languageCode = locale.split('_').first; + final List splittedLocale = locale.split('_'); + final String languageCode = splittedLocale.first; + final String countryCode = '_${splittedLocale.last}'; if (_translations.containsKey(languageCode)) { translation = _translations[languageCode]; + } else if (_translations.containsKey(countryCode)) { + translation = _translations[countryCode]; } } @@ -336,9 +340,13 @@ class _TaglineJSONFeed { // Try by language if (locale.contains('_')) { - final String languageCode = locale.split('_').first; + final List splittedLocale = locale.split('_'); + final String languageCode = splittedLocale.first; + final String countryCode = '_${splittedLocale.last}'; if (_news.containsKey(languageCode)) { return _news[languageCode]!; + } else if (_news.containsKey(countryCode)) { + return _news[countryCode]!; } }