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

Feature Request: Support Dynamic Image Localization #793

Open
vexr opened this issue Dec 18, 2024 · 0 comments
Open

Feature Request: Support Dynamic Image Localization #793

vexr opened this issue Dec 18, 2024 · 0 comments

Comments

@vexr
Copy link
Contributor

vexr commented Dec 18, 2024

Docusaurus currently lacks a solution for dynamically switching images based on the active locale. This enhancement would allow images to be served according to the user's selected language, ensuring a more seamless localization experience.

The improvement would focus on automatically localizing images referenced in MDX or Markdown files by adjusting image paths based on the active locale. If locale-specific images are unavailable, the system would default to the English version as a fallback. The images would be organized in locale-specific static paths (e.g., /img/en/space-acres/image1.png and /img/vi/space-acres/image1.png), streamlining content management without additional manual steps.

This enhancement would benefit several aspects:

  • Improved Localization: Users would see images that are localized to their selected language, improving the experience for multi-language guides.
  • Easier Maintenance: The workflow would be simplified, as the system would handle image path localization, requiring only that the images be placed in the correct locale-specific directories.

Additionally, while users of the docs would also benefit from embedded YouTube video links being dynamically updated based on the locale, automating this for videos may be more challenging without custom components.

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

No branches or pull requests

1 participant