Skip to content

Add mobile language switcher to navigation menu#38

Merged
pseudobun merged 1 commit intomainfrom
claude/mobile-language-switcher-hqOV9
Feb 25, 2026
Merged

Add mobile language switcher to navigation menu#38
pseudobun merged 1 commit intomainfrom
claude/mobile-language-switcher-hqOV9

Conversation

@pseudobun
Copy link
Owner

Summary

This PR improves the mobile navigation experience by adding a language switcher to the mobile menu while hiding the desktop language switcher on smaller screens.

Key Changes

  • Hidden the desktop language switcher on mobile devices by adding hidden md:flex classes
  • Increased the mobile menu max-height from max-h-64 to max-h-96 to accommodate the new language switcher
  • Added a language switcher component to the mobile menu with the same functionality as the desktop version, including:
    • Visual separator (border-top) to distinguish it from menu items
    • Locale links with proper styling (current locale highlighted, others interactive)
    • Consistent styling with the desktop language switcher

Implementation Details

  • The mobile language switcher is placed at the bottom of the mobile menu with a top border for visual separation
  • Uses the same locales array and getSwitchUrl() function as the desktop version for consistency
  • Maintains the same hover and active state styling as the desktop language switcher
  • The handleLinkClick callback is reused to ensure proper menu closing behavior when switching languages on mobile

https://claude.ai/code/session_01UFny7TFUHfifxs9d5w5VMc

On mobile, the language switcher in the header row was pushing the burger
menu button to the center instead of the right edge. Fixed by hiding the
language switcher from the header on mobile (hidden md:flex) and adding
it at the bottom of the mobile dropdown menu with a separator line.

https://claude.ai/code/session_01UFny7TFUHfifxs9d5w5VMc
@vercel
Copy link

vercel bot commented Feb 25, 2026

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

Project Deployment Actions Updated (UTC)
me Ready Ready Preview, Comment Feb 25, 2026 8:24am

@changeset-bot
Copy link

changeset-bot bot commented Feb 25, 2026

⚠️ No Changeset found

Latest commit: a8556da

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pseudobun pseudobun merged commit c3709f9 into main Feb 25, 2026
3 checks passed
@pseudobun pseudobun deleted the claude/mobile-language-switcher-hqOV9 branch February 25, 2026 08:26
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.

2 participants