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