Replies: 1 comment 2 replies
-
I think that preserving user preferences in local storage is a nice feature to have. Have not seen anything in the discussions or issues so far that suggests this exists and at first glance the code also does not seem to have an implementation. Could be missing something as I have only started collaborating on the project in October. You should wait for @squidfunk to weigh in here. One thing I can say that that similar functionality exists for cookie consent, linked tabs and the palette choice (that is used by the day/night mode selector). Would be good to follow the way in which these are implemented. Perhaps the day/night mode selector is the closest equivalent? For example, it looks like the variable names chosen try to stay out of the way of site authors by using two underscores, so would be good if you could follow that principle. One additional bit to take care of compared to the palette is that the language choice also appears in the URL. I guess the presence of the |
Beta Was this translation helpful? Give feedback.
-
My audience is a mix of Dutch and international users, so my website is in Dutch and English. I'd like to store the language selection in local storage, so that the user does not need to switch away from the default language all the time.
Has somebody already done that?
If not, I'll do that myself and submit a pull request.
Beta Was this translation helpful? Give feedback.
All reactions