'use client'; import { useState, useEffect } from 'react'; import { useTDK } from '../../../lib/useTDK'; import { useRouter, usePathname } from 'next/navigation'; import Navigation from '../../../components/Navigation'; import Footer from '../../../components/Footer'; import BackgroundElements from '../../../components/BackgroundElements'; interface PageProps { params: { locale: string }; } export default function SupportPage({ params }: PageProps) { const [currentLang, setCurrentLang] = useState(params.locale); const [isLoaded, setIsLoaded] = useState(false); const router = useRouter(); const pathname = usePathname(); // Update TDK when language changes useTDK(currentLang, 'support'); const translations = { 'zh-CN': { nav: { home: '首页', products: '产品', pricing: '价格', support: '支持', contact: '联系我们', }, support: { title: '技术支持', subtitle: '我们随时为您提供帮助', description: '无论您遇到什么问题,我们的专业团队都会为您提供及时的技术支持', faq: { title: '常见问题', items: [ { question: '如何开始使用云服务器?', answer: '注册账户后,选择适合的套餐,我们会在5分钟内为您部署服务器。', }, { question: '支持哪些操作系统?', answer: '我们支持Ubuntu、CentOS、Debian、Windows Server等主流操作系统。', }, { question: '如何备份数据?', answer: '我们提供自动备份服务,您也可以手动创建快照备份。', }, ], }, contact: { title: '联系支持', email: '邮箱支持', phone: '电话支持', chat: '在线客服', ticket: '提交工单', }, }, footer: { copyright: `© ${new Date().getFullYear()} CloudProxy. 版权所有.`, }, }, 'zh-TW': { nav: { home: '首頁', products: '產品', pricing: '價格', support: '支援', contact: '聯絡我們', }, support: { title: '技術支援', subtitle: '我們隨時為您提供幫助', description: '無論您遇到什麼問題,我們的專業團隊都會為您提供及時的技術支援', faq: { title: '常見問題', items: [ { question: '如何開始使用雲端伺服器?', answer: '註冊帳戶後,選擇適合的套餐,我們會在5分鐘內為您部署伺服器。', }, { question: '支援哪些作業系統?', answer: '我們支援Ubuntu、CentOS、Debian、Windows Server等主流作業系統。', }, { question: '如何備份資料?', answer: '我們提供自動備份服務,您也可以手動建立快照備份。', }, ], }, contact: { title: '聯絡支援', email: '郵箱支援', phone: '電話支援', chat: '線上客服', ticket: '提交工單', }, }, footer: { copyright: `© ${new Date().getFullYear()} CloudProxy. 版權所有.`, }, }, en: { nav: { home: 'Home', products: 'Products', pricing: 'Pricing', support: 'Support', contact: 'Contact', }, support: { title: 'Technical Support', subtitle: "We're here to help you", description: 'Whatever issues you encounter, our professional team will provide timely technical support', faq: { title: 'Frequently Asked Questions', items: [ { question: 'How do I get started with cloud servers?', answer: "After registering an account, choose a suitable plan, and we'll deploy your server within 5 minutes.", }, { question: 'Which operating systems are supported?', answer: 'We support mainstream operating systems including Ubuntu, CentOS, Debian, Windows Server, etc.', }, { question: 'How do I backup my data?', answer: 'We provide automatic backup services, and you can also manually create snapshot backups.', }, ], }, contact: { title: 'Contact Support', email: 'Email Support', phone: 'Phone Support', chat: 'Live Chat', ticket: 'Submit Ticket', }, }, footer: { copyright: `© ${new Date().getFullYear()} CloudProxy. All rights reserved.`, }, }, ko: { nav: { home: '홈', products: '제품', pricing: '가격', support: '지원', contact: '연락처', }, support: { title: '기술 지원', subtitle: '언제든지 도움을 드립니다', description: '어떤 문제가 발생하더라도 전문 팀이 신속한 기술 지원을 제공합니다', faq: { title: '자주 묻는 질문', items: [ { question: '클라우드 서버를 어떻게 시작하나요?', answer: '계정 등록 후 적합한 플랜을 선택하면 5분 내에 서버를 배포해드립니다.', }, { question: '어떤 운영체제를 지원하나요?', answer: 'Ubuntu, CentOS, Debian, Windows Server 등 주요 운영체제를 지원합니다.', }, { question: '데이터를 어떻게 백업하나요?', answer: '자동 백업 서비스를 제공하며, 수동으로 스냅샷 백업을 생성할 수도 있습니다.', }, ], }, contact: { title: '지원 연락', email: '이메일 지원', phone: '전화 지원', chat: '실시간 채팅', ticket: '티켓 제출', }, }, footer: { copyright: `© ${new Date().getFullYear()} CloudProxy. 모든 권리 보유.`, }, }, ja: { nav: { home: 'ホーム', products: '製品', pricing: '価格', support: 'サポート', contact: 'お問い合わせ', }, support: { title: 'テクニカルサポート', subtitle: 'いつでもお手伝いします', description: 'どのような問題が発生しても、専門チームが迅速な技術サポートを提供します', faq: { title: 'よくある質問', items: [ { question: 'クラウドサーバーの使用を開始するには?', answer: 'アカウント登録後、適切なプランを選択すると、5分以内にサーバーを展開します。', }, { question: 'どのオペレーティングシステムがサポートされていますか?', answer: 'Ubuntu、CentOS、Debian、Windows Serverなどの主要なオペレーティングシステムをサポートしています。', }, { question: 'データをバックアップするには?', answer: '自動バックアップサービスを提供しており、手動でスナップショットバックアップを作成することもできます。', }, ], }, contact: { title: 'サポートに連絡', email: 'メールサポート', phone: '電話サポート', chat: 'ライブチャット', ticket: 'チケット提出', }, }, footer: { copyright: `© ${new Date().getFullYear()} CloudProxy. 全著作権所有.`, }, }, }; const t = translations[currentLang as keyof typeof translations] || translations['zh-CN']; useEffect(() => { setIsLoaded(true); setCurrentLang(params.locale); }, [params.locale]); const handleLanguageChange = (newLang: string) => { const currentPath = pathname.replace(`/${currentLang}`, ''); router.push(`/${newLang}${currentPath}`); }; return (
{/* Header */}

{t.support.title}

{t.support.subtitle}

{t.support.description}

{/* FAQ Section */}

{t.support.faq.title}

{t.support.faq.items.map((item, index) => (

{item.question}

{item.answer}

))}
{/* Contact Support */}

{t.support.contact.title}

{[ { title: t.support.contact.email, icon: ( ), desc: 'support@cloudproxy.com', }, { title: t.support.contact.phone, icon: ( ), desc: '+1 (555) 123-4567', }, { title: t.support.contact.chat, icon: ( ), desc: '24/7 Live Support', }, { title: t.support.contact.ticket, icon: ( ), desc: 'Submit Support Ticket', }, ].map((contact, index) => (
{contact.icon}

{contact.title}

{contact.desc}

))}
); }