|
||
---|---|---|
src | ||
README.md | ||
index.html |
Multi Language with CSS
This example shows how to change to a different language easily and also saving it like a setting (localStorage.getItem
). The script that saves the settting is thanks to Divano's light and dark mode repo.
As for the CSS files, this uses <text>
and the id set to the text that'll be used on your website/app. CSS will add text by using content: ""
with ::before
.
Example: HTML
<text id="welcome-home"></text>
CSS
text#welcome-home::before {content: "Welcome Home!"}