home.social

#goeasyi18n — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #goeasyi18n, aggregated by home.social.

  1. Having a good night of sleep really helped me to solve the i18n issue I had with templ. I should write an article about it, as I am now really satisfied with the solution I found. Basically, I implemented a middleware to extract the preferred language from the Accept-Language header and push it into the request context. There it is easily accessible from templ. And I created a templ component to render the translated string.