Skip to content
New issue

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

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

Already on GitHub? # to your account

Localize site #4

Closed
johnfernow opened this issue Oct 29, 2019 · 3 comments · Fixed by #31
Closed

Localize site #4

johnfernow opened this issue Oct 29, 2019 · 3 comments · Fixed by #31

Comments

@johnfernow
Copy link
Owner

GitHub Pages doesn't allow custom backend code which would be the ideal way to serve the site in different languages. However, jQuery Localize seems like it would do the trick, and fortunately even if the user has JavaScript disabled it will at least display the page in English, and I could have a no-script tag that informs the user that Spanish is available if they enable JavaScript.

@johnfernow
Copy link
Owner Author

Aside from using jQuery Localize, I need to find some way to store the language (in case the user has manually changed the language from the one detected by default). I'll likely have to use localStorage. The comments in this issue may be helpful.

@johnfernow
Copy link
Owner Author

A drop-down to change the language could probably be on the main navbar on the far right side.

@johnfernow
Copy link
Owner Author

This link provides a good example of how to save and load the language from localStorage.

@johnfernow johnfernow mentioned this issue Dec 21, 2019
Merged
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant