feat: Update footer layout, add social media links, and improve styling
This commit is contained in:
@@ -11,8 +11,6 @@ import { notFound } from "next/navigation";
|
||||
|
||||
const inter = Inter({ subsets: ["latin"] });
|
||||
|
||||
export const runtime = 'edge';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Zen Browser",
|
||||
description: "Download now and experience the Zen Browser",
|
||||
|
||||
35
src/i18n.ts
Normal file
35
src/i18n.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { getRequestConfig } from "next-intl/server";
|
||||
import { headers } from "next/headers";
|
||||
|
||||
const SUPPORTED_LANGUAGES = ['en', 'de', 'ro'];
|
||||
|
||||
export default getRequestConfig(async () => {
|
||||
const headersList = headers();
|
||||
|
||||
const acceptLanguage = headersList.get("accept-language") || "en";
|
||||
|
||||
const [primaryLanguage] = acceptLanguage
|
||||
.split(",")
|
||||
.map((lang) => lang.split(";")[0])
|
||||
.map((lang) => lang.toLowerCase());
|
||||
|
||||
const locale = SUPPORTED_LANGUAGES.includes(primaryLanguage) ? primaryLanguage : 'en';
|
||||
|
||||
try {
|
||||
const messages = (await import(`../messages/${locale}.json`)).default;
|
||||
|
||||
return {
|
||||
locale,
|
||||
messages,
|
||||
};
|
||||
} catch (error) {
|
||||
console.error(`Failed to load messages for locale: ${locale}`, error);
|
||||
|
||||
const fallbackMessages = (await import(`../messages/en.json`)).default;
|
||||
|
||||
return {
|
||||
locale: "en",
|
||||
messages: fallbackMessages,
|
||||
};
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user