mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-01 03:48:24 +00:00
@@ -1,3 +1,4 @@
|
||||
import { I18nNsType } from '@/types/i18n';
|
||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
|
||||
|
||||
export const LANG_KEY = 'NEXT_LOCALE_LANG';
|
||||
@@ -16,8 +17,8 @@ export const langMap = {
|
||||
}
|
||||
};
|
||||
|
||||
export const serviceSideProps = (content: any) => {
|
||||
return serverSideTranslations(content.locale, undefined, null, content.locales);
|
||||
export const serviceSideProps = (content: any, ns: I18nNsType = []) => {
|
||||
return serverSideTranslations(content.locale, ['common', ...ns], null, content.locales);
|
||||
};
|
||||
|
||||
export const getLng = (lng: string) => {
|
||||
|
Reference in New Issue
Block a user