mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-11 16:05:47 +01:00
add support for da and he languages
This commit is contained in:
@@ -4,6 +4,8 @@ module.exports = {
|
||||
defaultLocale: 'en',
|
||||
locales: [
|
||||
'en',
|
||||
'da',
|
||||
'he',
|
||||
'de',
|
||||
'es',
|
||||
'fr',
|
||||
|
||||
@@ -5,7 +5,7 @@ import { getCookie, setCookie } from 'cookies-next';
|
||||
import Head from 'next/head';
|
||||
import { MantineProvider, ColorScheme, ColorSchemeProvider, MantineTheme } from '@mantine/core';
|
||||
import { NotificationsProvider } from '@mantine/notifications';
|
||||
import { useHotkeys } from '@mantine/hooks';
|
||||
import { useColorScheme, useHotkeys } from '@mantine/hooks';
|
||||
import { ModalsProvider } from '@mantine/modals';
|
||||
import { appWithTranslation } from 'next-i18next';
|
||||
import { QueryClientProvider } from '@tanstack/react-query';
|
||||
@@ -16,7 +16,8 @@ import { queryClient } from '../tools/queryClient';
|
||||
|
||||
function App(this: any, props: AppProps & { colorScheme: ColorScheme }) {
|
||||
const { Component, pageProps } = props;
|
||||
const [colorScheme, setColorScheme] = useState<ColorScheme>(props.colorScheme);
|
||||
const preferredColorScheme = useColorScheme();
|
||||
const [colorScheme, setColorScheme] = useState<ColorScheme>(preferredColorScheme);
|
||||
|
||||
const [primaryColor, setPrimaryColor] = useState<MantineTheme['primaryColor']>('red');
|
||||
const [secondaryColor, setSecondaryColor] = useState<MantineTheme['primaryColor']>('orange');
|
||||
|
||||
@@ -25,6 +25,20 @@ export const languages: Language[] = [
|
||||
translatedName: 'English',
|
||||
emoji: '🇬🇧',
|
||||
},
|
||||
// Danish
|
||||
{
|
||||
shortName: 'da',
|
||||
originalName: 'Dansk',
|
||||
translatedName: 'Danish',
|
||||
emoji: '🇩🇰',
|
||||
},
|
||||
// Hebrew
|
||||
{
|
||||
shortName: 'he',
|
||||
originalName: 'עברית',
|
||||
translatedName: 'Hebrew',
|
||||
emoji: '🇮🇱',
|
||||
},
|
||||
{
|
||||
shortName: 'es',
|
||||
originalName: 'Español',
|
||||
|
||||
Reference in New Issue
Block a user