Sort language list alphabetically
This commit is contained in:
@@ -40,7 +40,8 @@ const languageFlags = {
|
||||
pl: '<svg viewBox="0 0 24 16" xmlns="http://www.w3.org/2000/svg"><rect width="24" height="16" fill="#ffffff"/><rect y="8" width="24" height="8" fill="#dc143c"/></svg>'
|
||||
};
|
||||
|
||||
const languages = computed(() => [
|
||||
const languages = computed(() => {
|
||||
const items = [
|
||||
{ code: 'en', label: t('language.en') },
|
||||
{ code: 'zh', label: t('language.zh') },
|
||||
{ code: 'hi', label: t('language.hi') },
|
||||
@@ -52,7 +53,9 @@ const languages = computed(() => [
|
||||
{ code: 'pt', label: t('language.pt') },
|
||||
{ code: 'ur', label: t('language.ur') },
|
||||
{ code: 'pl', label: t('language.pl') }
|
||||
]);
|
||||
];
|
||||
return items.sort((a, b) => a.label.localeCompare(b.label, locale.value));
|
||||
});
|
||||
|
||||
const installLabel = computed(() => {
|
||||
return isCoarsePointer.value ? t('pwa.installMobile') : t('pwa.installDesktop');
|
||||
|
||||
Reference in New Issue
Block a user