mirror of
https://github.com/sipeed/NanoKVM.git
synced 2026-09-19 15:15:33 -05:00
sort languages
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
export const languages = [
|
const languages = [
|
||||||
{ key: 'da', name: 'Danish' },
|
{ key: 'da', name: 'Danish' },
|
||||||
{ key: 'de', name: 'Deutsch' },
|
{ key: 'de', name: 'Deutsch' },
|
||||||
{ key: 'en', name: 'English' },
|
{ key: 'en', name: 'English' },
|
||||||
@@ -14,3 +14,7 @@ export const languages = [
|
|||||||
{ key: 'ja', name: '日本語' },
|
{ key: 'ja', name: '日本語' },
|
||||||
{ key: 'cz', name: 'Česky' }
|
{ key: 'cz', name: 'Česky' }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
languages.sort((a, b) => a.name.localeCompare(b.name, 'en', { sensitivity: 'base' }));
|
||||||
|
|
||||||
|
export default languages;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const cs = {
|
const cz = {
|
||||||
translation: {
|
translation: {
|
||||||
language: 'Jazyk',
|
language: 'Jazyk',
|
||||||
changePassword: 'Změnit heslo',
|
changePassword: 'Změnit heslo',
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import clsx from 'clsx';
|
|||||||
import { LanguagesIcon } from 'lucide-react';
|
import { LanguagesIcon } from 'lucide-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import { languages } from '@/i18n/languages.ts';
|
import languages from '@/i18n/languages.ts';
|
||||||
import { setLanguage } from '@/lib/localstorage.ts';
|
import { setLanguage } from '@/lib/localstorage.ts';
|
||||||
|
|
||||||
export const Language = () => {
|
export const Language = () => {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import clsx from 'clsx';
|
|||||||
import { LanguagesIcon } from 'lucide-react';
|
import { LanguagesIcon } from 'lucide-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import { languages } from '@/i18n/languages.ts';
|
import languages from '@/i18n/languages.ts';
|
||||||
import { setLanguage } from '@/lib/localstorage.ts';
|
import { setLanguage } from '@/lib/localstorage.ts';
|
||||||
|
|
||||||
export const Language = () => {
|
export const Language = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user