Closed BobbieGoede closed 6 months ago
Closing as I think the solution for this use case can and should be resolved differently, based on recommendations by Daniel and Joaquin I'll explore a different approach for SSG, inserting translations in the page while detecting and translating during hydration client-side, though I'm not sure yet when I will have time to work on it.
๐ Linked issue
โ Type of change
๐ Description
This is still a work in progress!
Adds
detectBrowserLanguage.useLocalStorage
which can be set tostring | undefined
, when set to a string this will be used to attempt to retrieve stored language inlocalStorage
on the client-side.This could potentially be useful for projects that want to store language settings but are not able (or don't want to) to use cookies, as is the case for https://github.com/elk-zone/elk.
I think we may want to consider a similar pattern as the
localeDetector
we currently use for the server side translations feature.๐ Checklist