import { getTranslations, Locale, getNavigationPaths } from '@/lib/i18n'; import { generateMetadata as generateSEOMetadata } from '@/lib/seo'; import Layout from '@/components/Layout'; interface ProductsPageProps { params: { locale: Locale; }; } export async function generateStaticParams() { const locales = ['zh-CN', 'zh-TW', 'en']; return locales.map((locale) => ({ locale, })); } export async function generateMetadata({ params }: ProductsPageProps) { return generateSEOMetadata(params.locale, 'products'); } export default async function ProductsPage({ params }: ProductsPageProps) { const { locale } = params; const [common, products] = await Promise.all([ getTranslations(locale, 'common'), getTranslations(locale, 'products'), ]); const navigationPaths = getNavigationPaths(locale); const navigation = [ { name: common.navigation.home, href: navigationPaths.find((p) => p.key === 'home')?.path || '/', }, { name: common.navigation.products, href: navigationPaths.find((p) => p.key === 'products')?.path || '/products', }, { name: common.navigation.news, href: navigationPaths.find((p) => p.key === 'news')?.path || '/news', }, { name: common.navigation.support, href: navigationPaths.find((p) => p.key === 'support')?.path || '/support', }, { name: common.navigation.about, href: navigationPaths.find((p) => p.key === 'about')?.path || '/about', }, ]; return ( {/* Hero Section */}

{products.title}

{products.subtitle}

{/* Categories Section */}

{locale === 'en' ? 'Service Categories' : locale === 'zh-TW' ? '服務類別' : '服务类别'}

{products.categories.map((category: any, index: number) => (
{category.icon}

{category.name}

{category.description}

))}
{/* Products Grid */}

{locale === 'en' ? 'Our Solutions' : locale === 'zh-TW' ? '我們的解決方案' : '我们的解决方案'}

{products.items.map((product: any, index: number) => (
{/* Product Icon/Image */}
{product.icon || '💼'}

{product.title}

{product.description}

{/* Features */}

{locale === 'en' ? 'Key Features:' : locale === 'zh-TW' ? '主要功能:' : '主要功能:'}

{product.features .slice(0, 4) .map((feature: string, featureIndex: number) => ( {feature} ))} {product.features.length > 4 && ( +{product.features.length - 4}{' '} {locale === 'en' ? 'more' : locale === 'zh-TW' ? '更多' : '更多'} )}
{/* CTA Button */}
))}
{/* CTA Section */}

{locale === 'en' ? 'Ready to Transform Your Business?' : locale === 'zh-TW' ? '準備好轉型您的業務了嗎?' : '准备好转型您的业务了吗?'}

{locale === 'en' ? 'Contact our experts to discuss your specific needs and get a customized solution.' : locale === 'zh-TW' ? '聯絡我們的專家討論您的具體需求,獲得客製化解決方案。' : '联系我们的专家讨论您的具体需求,获得定制化解决方案。'}

); }