Merge pull request #697 from ajnart/add-norwegian-slovak

🌐 Add Norwegian and Slovak
This commit is contained in:
Thomas Camlong
2023-02-11 08:38:35 +09:00
committed by GitHub
3 changed files with 16 additions and 10 deletions

View File

@@ -25,6 +25,8 @@ module.exports = {
'uk', 'uk',
'zh', 'zh',
'el', 'el',
'sk',
'no',
], ],
localePath: path.resolve('./public/locales'), localePath: path.resolve('./public/locales'),
fallbackLng: 'en', fallbackLng: 'en',

View File

@@ -9,7 +9,6 @@ import {
} from '@mantine/core'; } from '@mantine/core';
import React from 'react'; import React from 'react';
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
import Link from 'next/link'; import Link from 'next/link';
const useStyles = createStyles((theme) => ({ const useStyles = createStyles((theme) => ({
@@ -94,12 +93,3 @@ export default function Custom404() {
</Container> </Container>
); );
} }
export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale, ['common'])),
// Will be passed to the page component as props
},
};
}

View File

@@ -75,6 +75,20 @@ export const languages: Language[] = [
translatedName: 'LOLCAT', translatedName: 'LOLCAT',
emoji: '🐱', emoji: '🐱',
}, },
// Norwegian
{
shortName: 'no',
originalName: 'Norsk',
translatedName: 'Norwegian',
emoji: '🇳🇴',
},
// Slovak
{
shortName: 'sk',
originalName: 'Slovenčina',
translatedName: 'Slovak',
emoji: '🇸🇰',
},
{ {
shortName: 'nl', shortName: 'nl',
originalName: 'Nederlands', originalName: 'Nederlands',