Transform Your Face with AI Technology

Experience our cutting-edge face swap technology that delivers seamless, photorealistic results in seconds. Perfect for content creators, marketers, and entertainment professionals.

Powerful Features

Our AI-powered face swap technology comes with features designed to give you the best experience.

Lightning Fast

Get your results in seconds, not minutes. Our optimized AI models deliver high-quality face swaps with minimal waiting time.

Secure & Private

Your privacy matters. All uploads are encrypted, processed securely, and automatically deleted after processing.

Realistic Results

Our advanced neural networks ensure natural-looking results with proper lighting, skin tone, and expressions preserved.

Style Control

Adjust the style, intensity, and fine details of your face swap with our intuitive control options.

Video Support

Swap faces in videos with consistent results across frames. Perfect for creating engaging content.

Batch Processing

Process multiple images or videos simultaneously with our efficient batch processing capabilities.

How It Works

Our advanced AI technology makes face swapping simple and seamless. Here's the process:

1

Face Detection & Analysis

Our AI uses cutting-edge computer vision to detect and analyze facial features, landmarks, and expressions in your images with pixel-perfect precision.

2

Neural Network Processing

Our proprietary deep learning models process the facial data, preserving lighting conditions, skin tones, and natural expressions for realistic results.

3

Seamless Integration

The AI carefully blends the face swap result with the target image, ensuring natural transitions and consistent visual quality.

4

Final Enhancement

Advanced post-processing algorithms enhance the result, fixing any imperfections and ensuring the highest quality output for your creative projects.

See It In Action

Watch our AI face swap technology create stunning, realistic results in seconds.

AI Face Swap Demo

Our technology delivers consistent, high-quality results across different lighting conditions, angles, and expressions.

Try It Now

Simple, Transparent Pricing

Choose the plan that fits your needs. No hidden fees, cancel anytime.

Basic

9
  • 50 face swaps per month
  • HD quality output
  • Image processing
  • Basic editing tools
  • Email support
Get Started

Enterprise

99
  • Unlimited face swaps
  • 8K quality output
  • Batch processing
  • API access
  • 24/7 dedicated support
  • Custom integration
Contact Sales

What Our Clients Say

Hear from creative professionals who trust our technology for their projects.

AI 变脸 has completely transformed our marketing campaigns. The quality is incredible, and the speed allows us to iterate quickly on creative concepts.

Avatar

Sarah Johnson

Marketing Director, CreativeCorp

As a content creator, I need tools that keep up with my workflow. This technology saves me hours of work and the results are indistinguishable from professional editing.

Avatar

Michael Chen

YouTube Creator, 2M Subscribers

The Enterprise plan API integration has been a game-changer for our app. Our users love the face swap feature, and the support team has been exceptional with our implementation.

Avatar

Carlos Rodriguez

CTO, PhotoMagic App

Ready to Transform Your Creative Process?

Join thousands of professionals using AI 变脸 to create stunning content.

Get Started Today

Get In Touch

Have questions or need custom solutions? Contact our team today.

function showTestimonial(index) { testimonials.forEach((testimonial, i) => { testimonial.style.display = i === index ? 'block' : 'none'; }); } // Initialize showTestimonial(currentTestimonial); // Auto-rotate testimonials setInterval(() => { currentTestimonial = (currentTestimonial + 1) % testimonials.length; showTestimonial(currentTestimonial); }, 5000); // =============================================== // Language Switcher - Improved Implementation // =============================================== // Initialize language let currentLanguage = 'en'; // Language translations object const translations = { // Navigation 'Features': { 'en': 'Features', 'zh': '功能' }, 'How It Works': { 'en': 'How It Works', 'zh': '工作原理' }, 'Demo': { 'en': 'Demo', 'zh': '演示' }, 'Pricing': { 'en': 'Pricing', 'zh': '价格' }, 'Contact': { 'en': 'Contact', 'zh': '联系我们' }, // Hero section 'Transform Your Face with AI Technology': { 'en': 'Transform Your Face with AI Technology', 'zh': '用人工智能技术变换你的脸' }, 'Experience our cutting-edge face swap technology that delivers seamless, photorealistic results in seconds. Perfect for content creators, marketers, and entertainment professionals.': { 'en': 'Experience our cutting-edge face swap technology that delivers seamless, photorealistic results in seconds. Perfect for content creators, marketers, and entertainment professionals.', 'zh': '体验我们尖端的人脸交换技术,在几秒钟内提供无缝、逼真的结果。适合内容创作者、营销人员和娱乐专业人士。' }, 'See Demo': { 'en': 'See Demo', 'zh': '查看演示' }, 'View Plans': { 'en': 'View Plans', 'zh': '查看套餐' }, // Features section 'Powerful Features': { 'en': 'Powerful Features', 'zh': '强大功能' }, 'Our AI-powered face swap technology comes with features designed to give you the best experience.': { 'en': 'Our AI-powered face swap technology comes with features designed to give you the best experience.', 'zh': '我们的人工智能人脸交换技术配备了为您提供最佳体验的功能。' }, 'Lightning Fast': { 'en': 'Lightning Fast', 'zh': '极速处理' }, 'Get your results in seconds, not minutes. Our optimized AI models deliver high-quality face swaps with minimal waiting time.': { 'en': 'Get your results in seconds, not minutes. Our optimized AI models deliver high-quality face swaps with minimal waiting time.', 'zh': '在几秒钟内获得结果,而不是几分钟。我们优化的AI模型提供高质量的人脸交换,等待时间最短。' }, 'Secure & Private': { 'en': 'Secure & Private', 'zh': '安全私密' }, 'Your privacy matters. All uploads are encrypted, processed securely, and automatically deleted after processing.': { 'en': 'Your privacy matters. All uploads are encrypted, processed securely, and automatically deleted after processing.', 'zh': '您的隐私很重要。所有上传内容都经过加密,安全处理,处理后自动删除。' }, 'Realistic Results': { 'en': 'Realistic Results', 'zh': '逼真效果' }, 'Our advanced neural networks ensure natural-looking results with proper lighting, skin tone, and expressions preserved.': { 'en': 'Our advanced neural networks ensure natural-looking results with proper lighting, skin tone, and expressions preserved.', 'zh': '我们先进的神经网络确保自然的效果,保留适当的光线、肤色和表情。' }, 'Style Control': { 'en': 'Style Control', 'zh': '风格控制' }, 'Adjust the style, intensity, and fine details of your face swap with our intuitive control options.': { 'en': 'Adjust the style, intensity, and fine details of your face swap with our intuitive control options.', 'zh': '使用我们直观的控制选项调整人脸交换的风格、强度和细节。' }, 'Video Support': { 'en': 'Video Support', 'zh': '视频支持' }, 'Swap faces in videos with consistent results across frames. Perfect for creating engaging content.': { 'en': 'Swap faces in videos with consistent results across frames. Perfect for creating engaging content.', 'zh': '在视频中交换面孔,帧间结果一致。非常适合创建有吸引力的内容。' }, 'Batch Processing': { 'en': 'Batch Processing', 'zh': '批量处理' }, 'Process multiple images or videos simultaneously with our efficient batch processing capabilities.': { 'en': 'Process multiple images or videos simultaneously with our efficient batch processing capabilities.', 'zh': '使用我们高效的批处理功能同时处理多张图像或视频。' }, // How It Works section 'How It Works': { 'en': 'How It Works', 'zh': '工作原理' }, 'Our advanced AI technology makes face swapping simple and seamless. Here\'s the process:': { 'en': 'Our advanced AI technology makes face swapping simple and seamless. Here\'s the process:', 'zh': '我们的先进人工智能技术使人脸交换变得简单无缝。以下是流程:' }, 'Face Detection & Analysis': { 'en': 'Face Detection & Analysis', 'zh': '人脸检测与分析' }, 'Our AI uses cutting-edge computer vision to detect and analyze facial features, landmarks, and expressions in your images with pixel-perfect precision.': { 'en': 'Our AI uses cutting-edge computer vision to detect and analyze facial features, landmarks, and expressions in your images with pixel-perfect precision.', 'zh': '我们的AI使用尖端计算机视觉技术,以像素级精度检测和分析图像中的面部特征、标志和表情。' }, 'Neural Network Processing': { 'en': 'Neural Network Processing', 'zh': '神经网络处理' }, 'Our proprietary deep learning models process the facial data, preserving lighting conditions, skin tones, and natural expressions for realistic results.': { 'en': 'Our proprietary deep learning models process the facial data, preserving lighting conditions, skin tones, and natural expressions for realistic results.', 'zh': '我们专有的深度学习模型处理面部数据,保留光照条件、肤色和自然表情,以获得逼真的结果。' }, 'Seamless Integration': { 'en': 'Seamless Integration', 'zh': '无缝集成' }, 'The AI carefully blends the face swap result with the target image, ensuring natural transitions and consistent visual quality.': { 'en': 'The AI carefully blends the face swap result with the target image, ensuring natural transitions and consistent visual quality.', 'zh': 'AI将人脸交换结果与目标图像仔细混合,确保自然过渡和一致的视觉质量。' }, 'Final Enhancement': { 'en': 'Final Enhancement', 'zh': '最终增强' }, 'Advanced post-processing algorithms enhance the result, fixing any imperfections and ensuring the highest quality output for your creative projects.': { 'en': 'Advanced post-processing algorithms enhance the result, fixing any imperfections and ensuring the highest quality output for your creative projects.', 'zh': '先进的后处理算法增强结果,修复任何不完美之处,确保为您的创意项目提供最高质量的输出。' }, // Demo section 'See It In Action': { 'en': 'See It In Action', 'zh': '实际演示' }, 'Watch our AI face swap technology create stunning, realistic results in seconds.': { 'en': 'Watch our AI face swap technology create stunning, realistic results in seconds.', 'zh': '观看我们的人工智能人脸交换技术在几秒钟内创建令人惊叹、逼真的结果。' }, 'Our technology delivers consistent, high-quality results across different lighting conditions, angles, and expressions.': { 'en': 'Our technology delivers consistent, high-quality results across different lighting conditions, angles, and expressions.', 'zh': '我们的技术在不同的光照条件、角度和表情下提供一致的高质量结果。' }, 'Try It Now': { 'en': 'Try It Now', 'zh': '立即试用' }, // Pricing section 'Simple, Transparent Pricing': { 'en': 'Simple, Transparent Pricing', 'zh': '简单透明的价格' }, 'Choose the plan that fits your needs. No hidden fees, cancel anytime.': { 'en': 'Choose the plan that fits your needs. No hidden fees, cancel anytime.', 'zh': '选择适合您需求的套餐。没有隐藏费用,随时可以取消。' }, 'Basic': { 'en': 'Basic', 'zh': '基础版' }, 'Professional': { 'en': 'Professional', 'zh': '专业版' }, 'Enterprise': { 'en': 'Enterprise', 'zh': '企业版' }, 'Get Started': { 'en': 'Get Started', 'zh': '开始使用' }, 'Contact Sales': { 'en': 'Contact Sales', 'zh': '联系销售' }, 'MOST POPULAR': { 'en': 'MOST POPULAR', 'zh': '最受欢迎' }, // Features list in pricing '50 face swaps per month': { 'en': '50 face swaps per month', 'zh': '每月50次人脸交换' }, 'HD quality output': { 'en': 'HD quality output', 'zh': 'HD高清输出' }, 'Image processing': { 'en': 'Image processing', 'zh': '图像处理' }, 'Basic editing tools': { 'en': 'Basic editing tools', 'zh': '基本编辑工具' }, 'Email support': { 'en': 'Email support', 'zh': '电子邮件支持' }, '200 face swaps per month': { 'en': '200 face swaps per month', 'zh': '每月200次人脸交换' }, '4K quality output': { 'en': '4K quality output', 'zh': '4K超清输出' }, 'Image & video processing': { 'en': 'Image & video processing', 'zh': '图像和视频处理' }, 'Advanced editing tools': { 'en': 'Advanced editing tools', 'zh': '高级编辑工具' }, 'Priority support': { 'en': 'Priority support', 'zh': '优先支持' }, 'Commercial license': { 'en': 'Commercial license', 'zh': '商业许可' }, 'Unlimited face swaps': { 'en': 'Unlimited face swaps', 'zh': '无限人脸交换' }, '8K quality output': { 'en': '8K quality output', 'zh': '8K超高清输出' }, 'Batch processing': { 'en': 'Batch processing', 'zh': '批量处理' }, 'API access': { 'en': 'API access', 'zh': 'API访问' }, '24/7 dedicated support': { 'en': '24/7 dedicated support', 'zh': '24/7专属支持' }, 'Custom integration': { 'en': 'Custom integration', 'zh': '定制集成' }, // Testimonials 'What Our Clients Say': { 'en': 'What Our Clients Say', 'zh': '客户评价' }, 'Hear from creative professionals who trust our technology for their projects.': { 'en': 'Hear from creative professionals who trust our technology for their projects.', 'zh': '听听信任我们技术的创意专业人士的评价。' }, // CTA section 'Ready to Transform Your Creative Process?': { 'en': 'Ready to Transform Your Creative Process?', 'zh': '准备好改变您的创作过程了吗?' }, 'Join thousands of professionals using AI 变脸 to create stunning content.': { 'en': 'Join thousands of professionals using AI 变脸 to create stunning content.', 'zh': '加入数千名使用AI 变脸创建精彩内容的专业人士。' }, 'Get Started Today': { 'en': 'Get Started Today', 'zh': '立即开始' }, // Contact section 'Get In Touch': { 'en': 'Get In Touch', 'zh': '联系我们' }, 'Have questions or need custom solutions? Contact our team today.': { 'en': 'Have questions or need custom solutions? Contact our team today.', 'zh': '有问题或需要定制解决方案?今天就联系我们团队。' }, 'Name': { 'en': 'Name', 'zh': '姓名' }, 'Email': { 'en': 'Email', 'zh': '电子邮件' }, 'Subject': { 'en': 'Subject', 'zh': '主题' }, 'Message': { 'en': 'Message', 'zh': '消息' }, 'Send Message': { 'en': 'Send Message', 'zh': '发送消息' }, // Form placeholders 'Your name': { 'en': 'Your name', 'zh': '您的姓名' }, 'Your email': { 'en': 'Your email', 'zh': '您的电子邮件' }, 'Your message': { 'en': 'Your message', 'zh': '您的消息' }, // Footer 'About Us': { 'en': 'About Us', 'zh': '关于我们' }, 'Quick Links': { 'en': 'Quick Links', 'zh': '快速链接' }, 'Support': { 'en': 'Support', 'zh': '支持' }, 'Contact Info': { 'en': 'Contact Info', 'zh': '联系信息' }, 'Help Center': { 'en': 'Help Center', 'zh': '帮助中心' }, 'Documentation': { 'en': 'Documentation', 'zh': '文档' }, 'API Reference': { 'en': 'API Reference', 'zh': 'API参考' }, 'Status': { 'en': 'Status', 'zh': '状态' }, 'Terms of Service': { 'en': 'Terms of Service', 'zh': '服务条款' } }; // Function to translate the website function translateWebsite(language) { currentLanguage = language; document.getElementById('current-lang').textContent = language.toUpperCase(); // Translate all text elements document.querySelectorAll('[data-en]').forEach(element => { const key = element.getAttribute('data-en'); if (translations[key] && translations[key][language]) { element.textContent = translations[key][language]; } }); // Directly translate specific elements that might not have data attributes translateElementBySelector('.hero h1', 'Transform Your Face with AI Technology'); translateElementBySelector('.hero p', 'Experience our cutting-edge face swap technology that delivers seamless, photorealistic results in seconds. Perfect for content creators, marketers, and entertainment professionals.'); translateElementBySelector('.hero-btns .btn:first-child', 'See Demo'); translateElementBySelector('.hero-btns .btn:last-child', 'View Plans'); translateElementBySelector('.features .section-title h2', 'Powerful Features'); translateElementBySelector('.features .section-title p', 'Our AI-powered face swap technology comes with features designed to give you the best experience.'); // Translate feature cards const featureTitles = [ 'Lightning Fast', 'Secure & Private', 'Realistic Results', 'Style Control', 'Video Support', 'Batch Processing' ]; document.querySelectorAll('.feature-title').forEach((element, index) => { if (index < featureTitles.length) { translateElement(element, featureTitles[index]); } }); // How it works section translateElementBySelector('.how-it-works .section-title h2', 'How It Works' ); translateElementBySelector('.how-it-works .section-title p', 'Our advanced AI technology makes face swapping simple and seamless. Here\' s the process:'); const howItWorksTitles=[ 'Face Detection & Analysis' , 'Neural Network Processing' , 'Seamless Integration' , 'Final Enhancement' ]; document.querySelectorAll('.step-title').forEach((element, index)=> { if (index < howItWorksTitles.length) { translateElement(element, howItWorksTitles[index]); } }); // Demo section translateElementBySelector('.demo .section-title h2', 'See It In Action' ); translateElementBySelector('.demo .section-title p', 'Watch our AI face swap technology create stunning, realistic results in seconds.' ); translateElementBySelector('.demo-container p', 'Our technology delivers consistent, high-quality results across different lighting conditions, angles, and expressions.' ); translateElementBySelector('.demo-container .btn', 'Try It Now' ); // Pricing section translateElementBySelector('.pricing .section-title h2', 'Simple, Transparent Pricing' ); translateElementBySelector('.pricing .section-title p', 'Choose the plan that fits your needs. No hidden fees, cancel anytime.' ); const pricingTitles=['Basic', 'Professional' , 'Enterprise' ]; document.querySelectorAll('.pricing-name').forEach((element, index)=> { if (index < pricingTitles.length) { translateElement(element, pricingTitles[index]); } }); // Pricing features - each list item document.querySelectorAll('.pricing-features li').forEach(element=> { const text = element.textContent.trim().replace(/^[✓•]?\s*/, ''); translateElement(element, text, true); // true to preserve the checkmark }); // Pricing buttons document.querySelectorAll('.pricing-card .btn').forEach((element, index) => { const key = index === 2 ? 'Contact Sales' : 'Get Started'; translateElement(element, key); }); // Testimonials translateElementBySelector('.testimonials .section-title h2', 'What Our Clients Say'); translateElementBySelector('.testimonials .section-title p', 'Hear from creative professionals who trust our technology for their projects.'); // CTA translateElementBySelector('.cta h2', 'Ready to Transform Your Creative Process?'); translateElementBySelector('.cta p', 'Join thousands of professionals using AI 变脸 to create stunning content.'); translateElementBySelector('.cta-btn', 'Get Started Today'); // Contact translateElementBySelector('.contact .section-title h2', 'Get In Touch'); translateElementBySelector('.contact .section-title p', 'Have questions or need custom solutions? Contact our team today.'); // Form labels const formLabels = ['Name', 'Email', 'Subject', 'Message']; document.querySelectorAll('.contact form label').forEach((element, index) => { if (index < formLabels.length) { translateElement(element, formLabels[index]); } }); // Placeholders document.querySelector('input[placeholder="Your name" ]').placeholder=translations['Your name'][language]; document.querySelector('input[placeholder="Your email" ]').placeholder=translations['Your email'][language]; document.querySelector('input[placeholder="Subject" ]').placeholder=translations['Subject'][language]; document.querySelector('textarea').placeholder=translations['Your message'][language]; // Send button translateElementBySelector('.contact form button', 'Send Message' ); // Footer sections const footerTitles=['About Us', 'Quick Links' , 'Support' , 'Contact Info' ]; document.querySelectorAll('.footer-column h3').forEach((element, index)=> { if (index < footerTitles.length) { translateElement(element, footerTitles[index]); } }); // Footer links document.querySelectorAll('.footer-links a').forEach(element=> { const text = element.textContent.trim(); if (translations[text] && translations[text][language]) { element.textContent = translations[text][language]; } }); } // Helper function to translate an element by selector function translateElementBySelector(selector, key) { const element = document.querySelector(selector); if (element && translations[key] && translations[key][currentLanguage]) { element.textContent = translations[key][currentLanguage]; } } // Helper function to translate a specific element function translateElement(element, key, preservePrefix = false) { if (translations[key] && translations[key][currentLanguage]) { if (preservePrefix) { // For elements with checkmarks or bullets, preserve them const prefix = element.textContent.match(/^[✓•]?\s*/)[0]; element.textContent = prefix + translations[key][currentLanguage]; } else { element.textContent = translations[key][currentLanguage]; } } } // Add language toggle event listener document.getElementById('language-toggle').addEventListener('click', function() { // Toggle between English and Chinese const newLanguage = currentLanguage === 'en' ? 'zh' : 'en'; translateWebsite(newLanguage); }); 先进人工智能技术使人脸交换变得简单无缝。以下是流程:' }, 'demo-title': { 'en': 'See It In Action', 'zh': '实际演示' }, 'demo-subtitle': { 'en': 'Watch our AI face swap technology create stunning, realistic results in seconds.', 'zh': '观看我们的人工智能人脸交换技术在几秒钟内创建令人惊叹、逼真的结果。' }, 'pricing-title': { 'en': 'Simple, Transparent Pricing', 'zh': '简单透明的价格' }, 'pricing-subtitle': { 'en': 'Choose the plan that fits your needs. No hidden fees, cancel anytime.', 'zh': '选择适合您需求的套餐。没有隐藏费用,随时可以取消。' }, 'testimonials-title': { 'en': 'What Our Clients Say', 'zh': '客户评价' }, 'testimonials-subtitle': { 'en': 'Hear from creative professionals who trust our technology for their projects.', 'zh': '听听信任我们技术的创意专业人士的评价。' }, 'cta-title': { 'en': 'Ready to Transform Your Creative Process?', 'zh': '准备好改变您的创作过程了吗?' }, 'cta-subtitle': { 'en': 'Join thousands of professionals using AI 变脸 to create stunning content.', 'zh': '加入数千名使用AI 变脸创建精彩内容的专业人士。' }, 'contact-title': { 'en': 'Get In Touch', 'zh': '联系我们' }, 'contact-subtitle': { 'en': 'Have questions or need custom solutions? Contact our team today.', 'zh': '有问题或需要定制解决方案?今天就联系我们团队。' }, 'basic': { 'en': 'Basic', 'zh': '基础版' }, 'pro': { 'en': 'Professional', 'zh': '专业版' }, 'enterprise': { 'en': 'Enterprise', 'zh': '企业版' }, 'most-popular': { 'en': 'MOST POPULAR', 'zh': '最受欢迎' }, 'get-started': { 'en': 'Get Started', 'zh': '开始使用' }, 'contact-sales': { 'en': 'Contact Sales', 'zh': '联系销售' }, 'try-now': { 'en': 'Try It Now', 'zh': '立即试用' }, 'get-started-today': { 'en': 'Get Started Today', 'zh': '立即开始' }, 'send-message': { 'en': 'Send Message', 'zh': '发送消息' }, 'name': { 'en': 'Name', 'zh': '姓名' }, 'email': { 'en': 'Email', 'zh': '电子邮件' }, 'subject': { 'en': 'Subject', 'zh': '主题' }, 'message': { 'en': 'Message', 'zh': '消息' } }; // Add translation data attributes to elements document.querySelectorAll('.translate').forEach(element => { const key = element.textContent.trim(); if (element.dataset.en === undefined) { element.dataset.en = key; element.dataset.zh = translations[key] ? translations[key].zh : key; } }); // Custom data attributes for more complex elements document.querySelector('.hero h1').dataset.key = 'hero-title'; document.querySelector('.hero p').dataset.key = 'hero-description'; document.querySelector('.hero-btns .btn:first-child').dataset.key = 'demo-btn'; document.querySelector('.hero-btns .btn:last-child').dataset.key = 'plans-btn'; document.querySelector('.features .section-title h2').dataset.key = 'features-title'; document.querySelector('.features .section-title p').dataset.key = 'features-subtitle'; document.querySelector('.how-it-works .section-title h2').dataset.key = 'how-title'; document.querySelector('.how-it-works .section-title p').dataset.key = 'how-subtitle'; document.querySelector('.demo .section-title h2').dataset.key = 'demo-title'; document.querySelector('.demo .section-title p').dataset.key = 'demo-subtitle'; document.querySelector('.pricing .section-title h2').dataset.key = 'pricing-title'; document.querySelector('.pricing .section-title p').dataset.key = 'pricing-subtitle'; document.querySelector('.testimonials .section-title h2').dataset.key = 'testimonials-title'; document.querySelector('.testimonials .section-title p').dataset.key = 'testimonials-subtitle'; document.querySelector('.cta h2').dataset.key = 'cta-title'; document.querySelector('.cta p').dataset.key = 'cta-subtitle'; document.querySelector('.contact .section-title h2').dataset.key = 'contact-title'; document.querySelector('.contact .section-title p').dataset.key = 'contact-subtitle'; document.querySelectorAll('.pricing-card').forEach((card, index) => { const key = index === 0 ? 'basic' : (index === 1 ? 'pro' : 'enterprise'); card.querySelector('.pricing-name').dataset.key = key; }); document.querySelectorAll('.pricing-card .btn').forEach((btn, index) => { const key = index === 2 ? 'contact-sales' : 'get-started'; btn.dataset.key = key; }); document.querySelector('.pricing-card.featured::before').textContent = translations['most-popular'][currentLanguage]; document.querySelector('.demo-container .btn').dataset.key = 'try-now'; document.querySelector('.cta-btn').dataset.key = 'get-started-today'; document.querySelector('.contact form button').dataset.key = 'send-message'; // Form label translations document.querySelectorAll('.contact form label').forEach(label => { const text = label.textContent.trim().toLowerCase(); label.dataset.key = text; }); // Toggle language function function toggleLanguage() { currentLanguage = currentLanguage === 'en' ? 'zh' : 'en'; document.getElementById('current-lang').textContent = currentLanguage.toUpperCase(); // Translate navigation links and buttons document.querySelectorAll('.translate').forEach(element => { element.textContent = element.dataset[currentLanguage]; }); // Translate elements with data-key attributes document.querySelectorAll('[data-key]').forEach(element => { const key = element.dataset.key; if (translations[key]) { element.textContent = translations[key][currentLanguage]; } }); // Update featured tag content for pricing if (document.querySelector('.pricing-card.featured::before')) { document.querySelector('.pricing-card.featured::before').textContent = translations['most-popular'][currentLanguage]; } // Update form placeholders const placeholderTranslations = { 'en': { 'name': 'Your name', 'email': 'Your email', 'subject': 'Subject', 'message': 'Your message' }, 'zh': { 'name': '您的姓名', 'email': '您的电子邮件', 'subject': '主题', 'message': '您的消息' } }; document.querySelector('input[placeholder="Your name"]').placeholder = placeholderTranslations[currentLanguage].name; document.querySelector('input[placeholder="Your email"]').placeholder = placeholderTranslations[currentLanguage].email; document.querySelector('input[placeholder="Subject"]').placeholder = placeholderTranslations[currentLanguage].subject; document.querySelector('textarea[placeholder="Your message"]').placeholder = placeholderTranslations[currentLanguage].message; } // Add language toggle event listener langToggle.addEventListener('click', toggleLanguage);