diff --git a/BTCPayServer/Views/Invoice/Checkout.cshtml b/BTCPayServer/Views/Invoice/Checkout.cshtml
index b7cc7cd01..7817ed16f 100644
--- a/BTCPayServer/Views/Invoice/Checkout.cshtml
+++ b/BTCPayServer/Views/Invoice/Checkout.cshtml
@@ -87,21 +87,23 @@
onchange="changeLanguage($(this).val())"
asp-items="@langService.GetLanguages().Select((language) => new SelectListItem(language.DisplayName,language.Code, false))">
-
+
+ function initDropdown(selector) {
+ return $(selector).prettyDropdown({
+ classic: false,
+ height: 32,
+ reverse: true,
+ hoverIntent: 5000
+ });
+ }
+
Powered by BTCPay Server
@@ -117,11 +119,8 @@
.Select((language) => language.Code)));;
var storeDefaultLang = "@Model.DefaultLang";
var fallbackLanguage = "en";
- var languageDropdownElement = $("#DefaultLang");
- var startingLanguage = computeStartingLanguage();
-
-
- // initialization
+ startingLanguage = computeStartingLanguage();
+ // initialization
i18next
.use(window.i18nextXHRBackend)
.init({
@@ -146,9 +145,9 @@
}
function changeLanguage(lang) {
- if (isLanguageAvailable(lang)) {
- i18next.changeLanguage(lang);
- }
+ if (isLanguageAvailable(lang)) {
+ i18next.changeLanguage(lang);
+ }
}
function isLanguageAvailable(languageCode) {
diff --git a/BTCPayServer/wwwroot/checkout/css/normalizer.css b/BTCPayServer/wwwroot/checkout/css/normalizer.css
index 7e9e9fb2f..386a156f9 100644
--- a/BTCPayServer/wwwroot/checkout/css/normalizer.css
+++ b/BTCPayServer/wwwroot/checkout/css/normalizer.css
@@ -11495,4 +11495,12 @@ low-fee-timeline {
}
-
+#prettydropdown-DefaultLang{
+ min-width:200px;
+}
+#prettydropdown-DefaultLang ul{
+ width:100%;
+}
+#prettydropdown-DefaultLang ul li{
+ width:100% !important;
+}
diff --git a/BTCPayServer/wwwroot/locales/cs.json b/BTCPayServer/wwwroot/locales/cs-CZ.json
similarity index 100%
rename from BTCPayServer/wwwroot/locales/cs.json
rename to BTCPayServer/wwwroot/locales/cs-CZ.json
diff --git a/BTCPayServer/wwwroot/locales/de.json b/BTCPayServer/wwwroot/locales/de-DE.json
similarity index 100%
rename from BTCPayServer/wwwroot/locales/de.json
rename to BTCPayServer/wwwroot/locales/de-DE.json
diff --git a/BTCPayServer/wwwroot/locales/es.json b/BTCPayServer/wwwroot/locales/es-ES.json
similarity index 100%
rename from BTCPayServer/wwwroot/locales/es.json
rename to BTCPayServer/wwwroot/locales/es-ES.json
diff --git a/BTCPayServer/wwwroot/locales/fr.json b/BTCPayServer/wwwroot/locales/fr-FR.json
similarity index 100%
rename from BTCPayServer/wwwroot/locales/fr.json
rename to BTCPayServer/wwwroot/locales/fr-FR.json
diff --git a/BTCPayServer/wwwroot/locales/hr.json b/BTCPayServer/wwwroot/locales/hr-HR.json
similarity index 100%
rename from BTCPayServer/wwwroot/locales/hr.json
rename to BTCPayServer/wwwroot/locales/hr-HR.json
diff --git a/BTCPayServer/wwwroot/locales/is.json b/BTCPayServer/wwwroot/locales/is-IS.json
similarity index 100%
rename from BTCPayServer/wwwroot/locales/is.json
rename to BTCPayServer/wwwroot/locales/is-IS.json
diff --git a/BTCPayServer/wwwroot/locales/it.json b/BTCPayServer/wwwroot/locales/it-IT.json
similarity index 100%
rename from BTCPayServer/wwwroot/locales/it.json
rename to BTCPayServer/wwwroot/locales/it-IT.json
diff --git a/BTCPayServer/wwwroot/locales/ja.json b/BTCPayServer/wwwroot/locales/ja-JP.json
similarity index 100%
rename from BTCPayServer/wwwroot/locales/ja.json
rename to BTCPayServer/wwwroot/locales/ja-JP.json
diff --git a/BTCPayServer/wwwroot/locales/kk.json b/BTCPayServer/wwwroot/locales/kk-KZ.json
similarity index 100%
rename from BTCPayServer/wwwroot/locales/kk.json
rename to BTCPayServer/wwwroot/locales/kk-KZ.json
diff --git a/BTCPayServer/wwwroot/locales/nl.json b/BTCPayServer/wwwroot/locales/nl-NL.json
similarity index 100%
rename from BTCPayServer/wwwroot/locales/nl.json
rename to BTCPayServer/wwwroot/locales/nl-NL.json
diff --git a/BTCPayServer/wwwroot/locales/np.json b/BTCPayServer/wwwroot/locales/np-NP.json
similarity index 100%
rename from BTCPayServer/wwwroot/locales/np.json
rename to BTCPayServer/wwwroot/locales/np-NP.json
diff --git a/BTCPayServer/wwwroot/locales/pt_BR.json b/BTCPayServer/wwwroot/locales/pt-BR.json
similarity index 100%
rename from BTCPayServer/wwwroot/locales/pt_BR.json
rename to BTCPayServer/wwwroot/locales/pt-BR.json
diff --git a/BTCPayServer/wwwroot/locales/pt.json b/BTCPayServer/wwwroot/locales/pt-PT.json
similarity index 100%
rename from BTCPayServer/wwwroot/locales/pt.json
rename to BTCPayServer/wwwroot/locales/pt-PT.json
diff --git a/BTCPayServer/wwwroot/locales/ru.json b/BTCPayServer/wwwroot/locales/ru-RU.json
similarity index 100%
rename from BTCPayServer/wwwroot/locales/ru.json
rename to BTCPayServer/wwwroot/locales/ru-RU.json
diff --git a/BTCPayServer/wwwroot/locales/uk.json b/BTCPayServer/wwwroot/locales/uk-UA.json
similarity index 100%
rename from BTCPayServer/wwwroot/locales/uk.json
rename to BTCPayServer/wwwroot/locales/uk-UA.json
diff --git a/BTCPayServer/wwwroot/locales/vi.json b/BTCPayServer/wwwroot/locales/vi-VN.json
similarity index 100%
rename from BTCPayServer/wwwroot/locales/vi.json
rename to BTCPayServer/wwwroot/locales/vi-VN.json
diff --git a/BTCPayServer/wwwroot/locales/zh_SP.json b/BTCPayServer/wwwroot/locales/zh-SP.json
similarity index 100%
rename from BTCPayServer/wwwroot/locales/zh_SP.json
rename to BTCPayServer/wwwroot/locales/zh-SP.json