Skip to content

Commit

Permalink
Merge pull request #36 from TeamVastsea/chore/lock
Browse files Browse the repository at this point in the history
chore: lock
  • Loading branch information
chun-awa authored Jan 3, 2025
2 parents 86772c9 + 5ca13cd commit 3ee6581
Show file tree
Hide file tree
Showing 3 changed files with 2,834 additions and 4,960 deletions.
15 changes: 15 additions & 0 deletions i18n/request.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { notFound } from 'next/navigation';
import { getRequestConfig } from 'next-intl/server';
import { LocalesList } from '@/src/locales';

export default getRequestConfig(async ({ requestLocale }) => {
let locale = await requestLocale;
// Ensure that the incoming locale is valid
if (!locale || !LocalesList.includes(locale as any)) {
locale = 'en';
}
return {
locale,
messages: (await import(`../messages/${locale}.json`)).default,
};
});
12 changes: 0 additions & 12 deletions src/i18n.ts

This file was deleted.

Loading

0 comments on commit 3ee6581

Please sign in to comment.