Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

svelte-intl-precompile updates html.lang #69

Open
CarlosAtDexcom opened this issue Sep 4, 2024 · 0 comments
Open

svelte-intl-precompile updates html.lang #69

CarlosAtDexcom opened this issue Sep 4, 2024 · 0 comments

Comments

@CarlosAtDexcom
Copy link

I found this piece of code

var $locale = writable("");
$locale.subscribe((newLocale) => {
  setCurrentLocale(newLocale);

  if (typeof window !== "undefined") {
    if (newLocale !== "") {
      document.documentElement.setAttribute("lang", newLocale);
    }
  }
});

its updating the lang attr so I wonder is there any way to prevent this ? since I'd like to update the lang in a diff way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant