We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef8993f commit a16410bCopy full SHA for a16410b
1 file changed
views/website/libraries/support/get-languages.js
@@ -23,5 +23,19 @@ module.exports = function getLanguages() {
23
result.push(data);
24
});
25
26
+ result.sort((a, b) => {
27
+ const nameA = a.name.toUpperCase(); // ignore upper and lowercase
28
+ const nameB = b.name.toUpperCase(); // ignore upper and lowercase
29
+ if (nameA < nameB) {
30
+ return -1;
31
+ }
32
+ if (nameA > nameB) {
33
+ return 1;
34
35
+
36
+ // names must be equal
37
+ return 0;
38
+ })
39
40
return result;
-};
41
+};
0 commit comments