Skip to content

Add Simplified Chinese (ZH) language support with CJK font fix across all pages#37

Merged
devNull-bootloader merged 4 commits intomainfrom
copilot/add-chinese-language-option
Mar 2, 2026
Merged

Add Simplified Chinese (ZH) language support with CJK font fix across all pages#37
devNull-bootloader merged 4 commits intomainfrom
copilot/add-chinese-language-option

Conversation

Copy link
Contributor

Copilot AI commented Mar 2, 2026

The site only supported EN/DE. This adds ZH as a third locale across all pages, with localStorage-backed preference persistence, and fixes CJK glyph rendering that caused Chinese text to appear as white boxes.

Changes

  • Language switcher — Added ZH button alongside EN/DE on index.html, impressum.html, and datenschutz.html
  • Translations — Full zh translation object in index.html covering header, features, support form (placeholders, price estimates, discount codes), footer, changelog (年/月 date format), and reviews; equivalent content translated in impressum.html and datenschutz.html
  • Persistence — Language choice written to localStorage; all pages read it on load so switching on one page persists site-wide
  • CJK font renderingInter has no CJK glyphs; added Noto Sans SC to the Google Fonts request and inserted it into the font-family stack on all three pages, eliminating the white-box fallback
<!-- font import -->
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Noto+Sans+SC:wght@400;600;700&display=swap" rel="stylesheet" />
font-family: "Inter", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

Main page (ZH):
Main page ZH

Impressum page (ZH):
Impressum ZH


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@vercel
Copy link

vercel bot commented Mar 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
project-x Ready Ready Preview, Comment Mar 2, 2026 11:24am

@theodorismmmm
Copy link
Collaborator

@copilot Also make the buttons work for the impressum and DATENSCHUTZ site

Co-authored-by: devNull-bootloader <189463177+devNull-bootloader@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Chinese to language options in XMenu website Add Chinese (Simplified) language option Mar 2, 2026
Co-authored-by: theodorismmmm <168644391+theodorismmmm@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 2, 2026

@copilot Also make the buttons work for the impressum and DATENSCHUTZ site

Done in commit 46cead1. Both impressum.html and datenschutz.html now have the EN/DE/ZH language switcher with full translations. The language preference also persists across all pages via localStorage, so switching to ZH on one page keeps it on the others.

Impressum in Chinese

Copilot AI changed the title Add Chinese (Simplified) language option Add Chinese (Simplified) language option across all pages Mar 2, 2026
@devNull-bootloader
Copy link
Collaborator

@copilot Why does it look like white boxes in the screenshots? Btw how can I coauthor this PR? I wanna ge that achievement.

Co-authored-by: devNull-bootloader <189463177+devNull-bootloader@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 2, 2026

@copilot Why does it look like white boxes in the screenshots? Btw how can I coauthor this PR? I wanna ge that achievement.

The white boxes appeared because Inter (the site's font) has no CJK glyphs — the browser couldn't render Chinese characters. Fixed in 9697251 by adding Noto Sans SC (Google's Simplified Chinese font) to the Google Fonts import and the font-family stack on all three pages. Chinese characters will now render properly everywhere.

Copilot AI changed the title Add Chinese (Simplified) language option across all pages Add Simplified Chinese (ZH) language support with CJK font fix across all pages Mar 2, 2026
@devNull-bootloader devNull-bootloader marked this pull request as ready for review March 2, 2026 11:27
@devNull-bootloader devNull-bootloader merged commit d7540e0 into main Mar 2, 2026
3 checks passed
@devNull-bootloader devNull-bootloader deleted the copilot/add-chinese-language-option branch March 3, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants