From c74e5e886dd8b108035e49c4bba23e7808281e6f Mon Sep 17 00:00:00 2001
Date: Mon, 14 Feb 2022 22:48:29 +0100
Subject: [PATCH] fallback to language without region
---
widgets.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/widgets.py b/widgets.py
index f1002ca..a084c07 100644
a
|
b
|
class AutocompleteMixin:
|
388 | 388 | self.db = using |
389 | 389 | self.choices = choices |
390 | 390 | self.attrs = {} if attrs is None else attrs.copy() |
391 | | self.i18n_name = SELECT2_TRANSLATIONS.get(get_language()) |
| 391 | self.i18n_name = SELECT2_TRANSLATIONS.get(get_language()) or \ |
| 392 | SELECT2_TRANSLATIONS.get(get_language().split('-')[0]) |
392 | 393 | |
393 | 394 | def get_url(self): |
394 | 395 | return reverse(self.url_name % self.admin_site.name) |