analogjs / analog

The fullstack meta-framework for Angular. Powered by Vite and Nitro
https://analogjs.org
MIT License
2.41k stars 225 forks source link

Native i18n support + localized content #702

Closed michaelkrog closed 3 months ago

michaelkrog commented 8 months ago

Which scope/s are relevant/related to the feature request?

platform

Information

I really miss i18n support for analogjs. I tried adding the localize package with ng add @angular/localize on a fresh analog project, but I am unable to extract translations afterwards. Event if it could, I am unsure if it would be able to work at all, as the documentation for analog doesn't mention i18n.

Coming from using Docusarus for https://previsto.com with a great wish to shift to a more "all-batteries-included" platform like Angular, I do wish the following were a part of Analog:

Describe any alternatives/workarounds you're currently using

I am currently using docusarus, but I am not satisfied will all the hacks needed to create a decent looking site. And since most of the other parts of the codebase are Angular-based, I would prefer to move https://previsto.com to a static website built with angular.

I have been fiddling with a pure Angular solution together with ngx-markdown and Angular pre-render functionality, but it would require a great amount of work to get routing working as nicely as with analog. On the other hand, i18n works out of the box when using angular by it self.

I would be willing to submit a PR to fix this issue

brandonroberts commented 8 months ago

@michaelkrog very nice website, and it would be great to natively support Angular i18n also, but there's a good bit of effort required to do that. Angular i18n is tied to Angular's default builders, so it won't work out of the box the same way. We'd essentially have to copy and modify those builders to work within Analog.

A better option until then would be to use Translooco which is well-supported and fully compatible with Analog and Angular.

If a company would consider sponsoring this work, that would be an option also.