We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b904136 commit 371abfdCopy full SHA for 371abfd
javascript/CMSMain.Translatable.js
@@ -8,12 +8,20 @@
8
return/** @lends ss.CMSMain.LangSelector */{
9
onmatch: function() {
10
var self = this;
11
+
12
+ // monitor form loading for any locale changes
13
+ $('#Form_EditForm').bind('loadnewpage', function(e) {
14
+ var newLocale = $(this).find(':input[name=Locale]').val();
15
+ if(newLocale) self.val(newLocale);
16
+ });
17
18
+ // whenever a new value is selected, reload the whole CMS in the new locale
19
this.bind('change', function(e) {
20
document.location = 'admin/?locale=' + $(e.target).val();
21
return false;
22
});
23
}
- }
24
+ };
25
26
27
/**
@@ -44,7 +52,7 @@
44
52
45
53
46
54
47
55
48
56
49
57
50
58
}(jQuery));
0 commit comments