This commit is contained in:
@@ -23,9 +23,11 @@ interface ContactPageProps {
|
|||||||
|
|
||||||
export async function generateMetadata({ params: { locale } }: ContactPageProps): Promise<Metadata> {
|
export async function generateMetadata({ params: { locale } }: ContactPageProps): Promise<Metadata> {
|
||||||
const t = await getTranslations({ locale, namespace: 'Contact' });
|
const t = await getTranslations({ locale, namespace: 'Contact' });
|
||||||
|
const title = t('meta.title') || t('title');
|
||||||
|
const description = t('meta.description') || t('subtitle');
|
||||||
return {
|
return {
|
||||||
title: t('title'),
|
title,
|
||||||
description: t('subtitle'),
|
description,
|
||||||
alternates: {
|
alternates: {
|
||||||
canonical: `https://klz-cables.com/${locale}/contact`,
|
canonical: `https://klz-cables.com/${locale}/contact`,
|
||||||
languages: {
|
languages: {
|
||||||
@@ -34,8 +36,8 @@ export async function generateMetadata({ params: { locale } }: ContactPageProps)
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
openGraph: {
|
openGraph: {
|
||||||
title: `${t('title')} | KLZ Cables`,
|
title: `${title} | KLZ Cables`,
|
||||||
description: t('subtitle'),
|
description,
|
||||||
url: `https://klz-cables.com/${locale}/contact`,
|
url: `https://klz-cables.com/${locale}/contact`,
|
||||||
siteName: 'KLZ Cables',
|
siteName: 'KLZ Cables',
|
||||||
images: [
|
images: [
|
||||||
@@ -51,8 +53,8 @@ export async function generateMetadata({ params: { locale } }: ContactPageProps)
|
|||||||
},
|
},
|
||||||
twitter: {
|
twitter: {
|
||||||
card: 'summary_large_image',
|
card: 'summary_large_image',
|
||||||
title: `${t('title')} | KLZ Cables`,
|
title: `${title} | KLZ Cables`,
|
||||||
description: t('subtitle'),
|
description,
|
||||||
images: ['https://klz-cables.com/logo.png'],
|
images: ['https://klz-cables.com/logo.png'],
|
||||||
},
|
},
|
||||||
robots: {
|
robots: {
|
||||||
|
|||||||
@@ -38,22 +38,22 @@ export default function HomePage({ params: { locale } }: { params: { locale: str
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function generateMetadata({ params: { locale } }: { params: { locale: string } }): Promise<Metadata> {
|
export async function generateMetadata({ params: { locale } }: { params: { locale: string } }): Promise<Metadata> {
|
||||||
// Use translations for meta where available (namespace: Home.meta)
|
// Use translations for meta where available (namespace: Index.meta)
|
||||||
// Fallback to a sensible default if translation keys are missing.
|
// Fallback to a sensible default if translation keys are missing.
|
||||||
let t;
|
let t;
|
||||||
try {
|
try {
|
||||||
t = await getTranslations({ locale, namespace: 'Home.meta' });
|
t = await getTranslations({ locale, namespace: 'Index.meta' });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// If translations for Home.meta are not present, try generic Home namespace
|
// If translations for Index.meta are not present, try generic Index namespace
|
||||||
try {
|
try {
|
||||||
t = await getTranslations({ locale, namespace: 'Home' });
|
t = await getTranslations({ locale, namespace: 'Index' });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
t = (key: string) => '';
|
t = (key: string) => '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const title = t('title') || 'KLZ Cables';
|
const title = t('title') || 'KLZ Cables';
|
||||||
const description = t('description') || t('subtitle') || '';
|
const description = t('description') || '';
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title,
|
title,
|
||||||
|
|||||||
@@ -15,9 +15,11 @@ interface ProductsPageProps {
|
|||||||
|
|
||||||
export async function generateMetadata({ params: { locale } }: ProductsPageProps): Promise<Metadata> {
|
export async function generateMetadata({ params: { locale } }: ProductsPageProps): Promise<Metadata> {
|
||||||
const t = await getTranslations({ locale, namespace: 'Products' });
|
const t = await getTranslations({ locale, namespace: 'Products' });
|
||||||
|
const title = t('meta.title') || t('title');
|
||||||
|
const description = t('meta.description') || t('subtitle');
|
||||||
return {
|
return {
|
||||||
title: t('title'),
|
title,
|
||||||
description: t('subtitle'),
|
description,
|
||||||
alternates: {
|
alternates: {
|
||||||
canonical: `/${locale}/products`,
|
canonical: `/${locale}/products`,
|
||||||
languages: {
|
languages: {
|
||||||
@@ -27,14 +29,14 @@ export async function generateMetadata({ params: { locale } }: ProductsPageProps
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
openGraph: {
|
openGraph: {
|
||||||
title: `${t('title')} | KLZ Cables`,
|
title: `${title} | KLZ Cables`,
|
||||||
description: t('subtitle'),
|
description,
|
||||||
url: `https://klz-cables.com/${locale}/products`,
|
url: `https://klz-cables.com/${locale}/products`,
|
||||||
},
|
},
|
||||||
twitter: {
|
twitter: {
|
||||||
card: 'summary_large_image',
|
card: 'summary_large_image',
|
||||||
title: `${t('title')} | KLZ Cables`,
|
title: `${title} | KLZ Cables`,
|
||||||
description: t('subtitle'),
|
description,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,9 +15,11 @@ interface TeamPageProps {
|
|||||||
|
|
||||||
export async function generateMetadata({ params: { locale } }: TeamPageProps): Promise<Metadata> {
|
export async function generateMetadata({ params: { locale } }: TeamPageProps): Promise<Metadata> {
|
||||||
const t = await getTranslations({ locale, namespace: 'Team' });
|
const t = await getTranslations({ locale, namespace: 'Team' });
|
||||||
|
const title = t('meta.title') || t('hero.subtitle');
|
||||||
|
const description = t('meta.description') || t('hero.title');
|
||||||
return {
|
return {
|
||||||
title: t('hero.subtitle'),
|
title,
|
||||||
description: t('hero.title'),
|
description,
|
||||||
alternates: {
|
alternates: {
|
||||||
canonical: `/${locale}/team`,
|
canonical: `/${locale}/team`,
|
||||||
languages: {
|
languages: {
|
||||||
@@ -27,14 +29,14 @@ export async function generateMetadata({ params: { locale } }: TeamPageProps): P
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
openGraph: {
|
openGraph: {
|
||||||
title: `${t('hero.subtitle')} | KLZ Cables`,
|
title: `${title} | KLZ Cables`,
|
||||||
description: t('hero.title'),
|
description,
|
||||||
url: `https://klz-cables.com/${locale}/team`,
|
url: `https://klz-cables.com/${locale}/team`,
|
||||||
},
|
},
|
||||||
twitter: {
|
twitter: {
|
||||||
card: 'summary_large_image',
|
card: 'summary_large_image',
|
||||||
title: `${t('hero.subtitle')} | KLZ Cables`,
|
title: `${title} | KLZ Cables`,
|
||||||
description: t('hero.title'),
|
description,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,6 +89,10 @@
|
|||||||
"tagline": "Wegweisend in der Kabelinfrastruktur und bei nachhaltigen Energielösungen. Qualität, Innovation und Zuverlässigkeit seit 1998."
|
"tagline": "Wegweisend in der Kabelinfrastruktur und bei nachhaltigen Energielösungen. Qualität, Innovation und Zuverlässigkeit seit 1998."
|
||||||
},
|
},
|
||||||
"Team": {
|
"Team": {
|
||||||
|
"meta": {
|
||||||
|
"title": "Unser Team | Die Experten hinter KLZ Cables",
|
||||||
|
"description": "Lernen Sie die Menschen kennen, die KLZ Cables antreiben. Jahrzehntelange Erfahrung in der Kabelindustrie trifft auf innovative Lösungen für die Energiewende."
|
||||||
|
},
|
||||||
"hero": {
|
"hero": {
|
||||||
"title": "Die Köpfe, die Energie zum Laufen bringen",
|
"title": "Die Köpfe, die Energie zum Laufen bringen",
|
||||||
"subtitle": "Wir verbinden Energie, Know-how und Innovation, um eine nachhaltigere Zukunft zu gestalten.",
|
"subtitle": "Wir verbinden Energie, Know-how und Innovation, um eine nachhaltigere Zukunft zu gestalten.",
|
||||||
@@ -155,6 +159,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Contact": {
|
"Contact": {
|
||||||
|
"meta": {
|
||||||
|
"title": "Kontaktieren Sie KLZ Cables | Ihr Partner für Kabelinfrastruktur",
|
||||||
|
"description": "Haben Sie Fragen zu unseren Strom- oder Solarkabeln? Kontaktieren Sie unser Expertenteam für technische Beratung und maßgeschneiderte Lösungen."
|
||||||
|
},
|
||||||
"title": "Kontaktieren Sie uns",
|
"title": "Kontaktieren Sie uns",
|
||||||
"subtitle": "Haben Sie Fragen zu unseren Produkten oder benötigen Sie eine maßgeschneiderte Lösung? Wir sind für Sie da.",
|
"subtitle": "Haben Sie Fragen zu unseren Produkten oder benötigen Sie eine maßgeschneiderte Lösung? Wir sind für Sie da.",
|
||||||
"heroSubtitle": "Kontakt aufnehmen",
|
"heroSubtitle": "Kontakt aufnehmen",
|
||||||
@@ -187,6 +195,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Products": {
|
"Products": {
|
||||||
|
"meta": {
|
||||||
|
"title": "Produktportfolio | Hochwertige Kabel für jede Anwendung",
|
||||||
|
"description": "Entdecken Sie unser umfassendes Sortiment an zertifizierten Kabeln: von Niederspannung über Mittel- und Hochspannung bis hin zu spezialisierten Solarkabeln."
|
||||||
|
},
|
||||||
"title": "Unsere Produkte",
|
"title": "Unsere Produkte",
|
||||||
"subtitle": "Entdecken Sie unser umfassendes Sortiment an hochwertigen Kabeln für jede Anwendung.",
|
"subtitle": "Entdecken Sie unser umfassendes Sortiment an hochwertigen Kabeln für jede Anwendung.",
|
||||||
"heroSubtitle": "Produktportfolio",
|
"heroSubtitle": "Produktportfolio",
|
||||||
|
|||||||
@@ -89,6 +89,10 @@
|
|||||||
"tagline": "Leading the way in cable infrastructure and sustainable energy solutions. Quality, innovation, and reliability since 1998."
|
"tagline": "Leading the way in cable infrastructure and sustainable energy solutions. Quality, innovation, and reliability since 1998."
|
||||||
},
|
},
|
||||||
"Team": {
|
"Team": {
|
||||||
|
"meta": {
|
||||||
|
"title": "Our Team | The Experts Behind KLZ Cables",
|
||||||
|
"description": "Meet the people driving KLZ Cables. Decades of experience in the cable industry meets innovative solutions for the energy transition."
|
||||||
|
},
|
||||||
"hero": {
|
"hero": {
|
||||||
"title": "The bright sparks behind the power",
|
"title": "The bright sparks behind the power",
|
||||||
"subtitle": "We connect energy, expertise, and innovation to power a greener future.",
|
"subtitle": "We connect energy, expertise, and innovation to power a greener future.",
|
||||||
@@ -155,6 +159,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Contact": {
|
"Contact": {
|
||||||
|
"meta": {
|
||||||
|
"title": "Contact KLZ Cables | Your Partner for Cable Infrastructure",
|
||||||
|
"description": "Have questions about our power or solar cables? Contact our expert team for technical advice and tailor-made solutions."
|
||||||
|
},
|
||||||
"title": "Get in Touch",
|
"title": "Get in Touch",
|
||||||
"subtitle": "Have questions about our products or need a custom solution? We're here to help.",
|
"subtitle": "Have questions about our products or need a custom solution? We're here to help.",
|
||||||
"heroSubtitle": "Get in Touch",
|
"heroSubtitle": "Get in Touch",
|
||||||
@@ -187,6 +195,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Products": {
|
"Products": {
|
||||||
|
"meta": {
|
||||||
|
"title": "Product Portfolio | High-Quality Cables for Every Application",
|
||||||
|
"description": "Explore our comprehensive range of certified cables: from low voltage to medium and high voltage, as well as specialized solar cables."
|
||||||
|
},
|
||||||
"title": "Our Products",
|
"title": "Our Products",
|
||||||
"subtitle": "Explore our comprehensive range of high-quality cables designed for every application.",
|
"subtitle": "Explore our comprehensive range of high-quality cables designed for every application.",
|
||||||
"heroSubtitle": "Product Portfolio",
|
"heroSubtitle": "Product Portfolio",
|
||||||
|
|||||||
Reference in New Issue
Block a user