Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(guide): added language switcher dropdown and Japanese language support. #544

Merged

Conversation

coji
Copy link
Contributor

@coji coji commented Mar 26, 2024

This pull request adds language switcher dropdown and Japanese language support to the Conform documentation site.

CleanShot 2024-03-26 at 15 47 40@2x

Key changes:

  • Modified layout.tsx to load localized navigation menu and added language switcher dropdown
  • Added allLanguages constant to define supported languages and their properties
    Updated getMetadata, getFileContent, and getDocPath functions to handle language-specific logic
  • Updated route files to use getDocPath for language-specific document paths

These changes enable a localized experience for Japanese users within the guide submodule, with the ability to switch between English and Japanese using the language dropdown in the header.

@coji coji changed the title [Guide] added language switcher dropdown and Japanese language support. feat(guide): added language switcher dropdown and Japanese language support. Mar 26, 2024
guide/app/layout.tsx Outdated Show resolved Hide resolved
@coji coji force-pushed the feature/guide-add-japanese-language-support branch from 6fd7e22 to e68f0cf Compare March 30, 2024 10:48
Copy link
Owner

@edmundhung edmundhung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @coji! I just made the logo smaller on desktop so the language switcher can fit in better, but everything else looks good to me!

Personally I would also prefer the language switcher to work before JS, but that might requires changes on the layout so I would leave it as a future improvement.

@edmundhung edmundhung merged commit c540df8 into edmundhung:main Mar 31, 2024
2 checks passed
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