0e98ea0b32
i18n support for event, post and job ads See merge request sahkoinsinoorikilta/vtmk/web2.0-frontend!51 (cherry picked from commit9e7fe73c04)39104f70install localisation library7ce9f384translate event page contents9bec3f1etranslate calendarsfeaaa981translate feed page1f7d842bfix news button translationac0d33effix e2e tests4eeb798dadd getStaticProps to use static optimization
17 lines
449 B
TypeScript
17 lines
449 B
TypeScript
import NextI18Next from "next-i18next";
|
|
|
|
import Config from "next/config";
|
|
import path from "path";
|
|
|
|
const NextI18NextInstance = new NextI18Next({
|
|
defaultLanguage: "fi",
|
|
defaultNS: "common",
|
|
localeSubpaths: Config().publicRuntimeConfig.localeSubpaths,
|
|
localePath: path.resolve("./public/locales"),
|
|
otherLanguages: ["en"],
|
|
});
|
|
|
|
export const { appWithTranslation, useTranslation } = NextI18NextInstance;
|
|
|
|
export default NextI18NextInstance;
|