with saber-translate, you can easily add content of your website in different languages and switch between them without refreshing the page.
saber-translate.js is less than 5kb.
saber-translate.min.js is less than 3kb.
https://cdn.statically.io/gh/ahmed0saber/saber-translate/main/saber-translate.js
https://cdn.statically.io/gh/ahmed0saber/saber-translate/main/saber-translate.min.js
https://ahmed0saber.github.io/saber-translate/example/
This library writes the page content in the client-side so it's bad for SEO, to solve this issue write default content for each translatable element, so search engines can find the content without running js.