chore: bump version to 2.23.9 and update dependencies (#446)
* chore: bump version to 2.23.9 and update dependencies - Updated application version from 2.23.8 to 2.23.9 in package.json. - Added @types/node dependency in email-templates package.json for improved type support. - Introduced NEXT_PUBLIC_DEFAULT_LOCALE environment variable in web app for localization settings. - Updated i18n initialization to utilize the new default locale setting.
This commit is contained in:
committed by
GitHub
parent
0b22404145
commit
2835c163cb
@@ -19,7 +19,8 @@
|
||||
"@kit/eslint-config": "workspace:*",
|
||||
"@kit/i18n": "workspace:*",
|
||||
"@kit/prettier-config": "workspace:*",
|
||||
"@kit/tsconfig": "workspace:*"
|
||||
"@kit/tsconfig": "workspace:*",
|
||||
"@types/node": "catalog:"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
import { initializeServerI18n } from '@kit/i18n/server';
|
||||
import { createI18nSettings } from '@kit/i18n';
|
||||
|
||||
export function initializeEmailI18n(params: {
|
||||
language: string | undefined;
|
||||
namespace: string;
|
||||
}) {
|
||||
const language = params.language ?? 'en';
|
||||
const language = params.language ?? process.env.NEXT_PUBLIC_DEFAULT_LOCALE ?? 'en';
|
||||
|
||||
return initializeServerI18n(
|
||||
{
|
||||
supportedLngs: [language],
|
||||
lng: language,
|
||||
ns: params.namespace,
|
||||
},
|
||||
createI18nSettings({
|
||||
language,
|
||||
languages: [language],
|
||||
namespaces: params.namespace,
|
||||
}),
|
||||
async (language, namespace) => {
|
||||
try {
|
||||
const data = await import(`../locales/${language}/${namespace}.json`);
|
||||
|
||||
Reference in New Issue
Block a user