Change `<html>` `lang` attribute in subroute
Is there a way to change the
<html>
lang
attribute in a nested route (e.g. /$lang
) based on URL params?
Thanks4 Replies
dependent-tan•9mo ago
react 18 or 19?
yappiest-sapphireOP•9mo ago
If it's different: both since I'm currently in 18 but we plan to upgrade in a month or two to 19
dependent-tan•9mo ago
you should be able to check the matches array in the root route and read the path param
or even do a useParams({strict: false})
yappiest-sapphireOP•9mo ago
Nice thanks 👍