Closed wackerow closed 1 year ago
Thank you for noticing this problem. I check out this PR and realized that it was not working in the lobby/contributing/complete pages. We were not having this issue before and I realized it was because the LanguageSelector element was not being loaded in the header. I make it load, used display=none
to hide it and the selected language was persistent accross all pages.
Description
Recently the ceremony and contributions pages were updated to open in new tabs. With this, the language selection from the landing page was lost, and the new pages opened with English even if the user changed languages.
Approach to fixing in this PR
/record
) pages are opened, by injected?lang=${language}
before the hash link in the path.useQueryParamLanguage
hook that checks for this query parameter and sets the i18next language to this language, defaulting to English if none provided.records
pageLanguageSelector
to use query param language as priority if provided, and to update thelang
query param any time the language is updated so this persist on refresh.?lang=
syntaxScreenshots