taverasmisael / taverasmisael.com

My personal website and blog. Build with an hybrid Astro SSR, SolidJS and TailwindCSS. Support for internazionalization and more.
https://taverasmisael.com
2 stars 0 forks source link

Improve the internationalization module #9

Open taverasmisael opened 1 year ago

taverasmisael commented 1 year ago

I wanted to do the i18n without external libraries to have more control and see how this works under the hood. It has its flaws, and we'll work on them eventually. The one we should tackle first is that we import both translation files, no matter the application's language. We should only bring one because the translations are not live; we do a full page reload when the user changes language.

So far, this is not an issue because we only have two languages, and there are few entries, but I can see this becoming a big problem over time, and it's better to work on this now or at least have a clear plan.