How can i change root f7-font-family depends on i18n.locale

How can i change root f7-font-family depends on $i18n.locale

it’s not working font doesn’t set

thanks for your answer

const root = document.querySelector(":root");

var font =
  this.$i18n.locale == "en"
    ? "Roboto-Bold"
    : this.$i18n.locale == "th"
    ? "Athiti"
    : "BoonHome-400";
root.style.setProperty("--f7-font-family", font);

const color = getComputedStyle(root).getPropertyValue("--f7-font-family");