Open modernduck opened 1 year ago
Firebase uses rewrites rather than redirects for i18n, we should document this but for SSR the locale is passed as an argument to the express app factory in your server.ts.
Our test suite uses i18n FYI, see our angular.json and server.ts
thank you @jamesdaniels
It worked 100% for me, with angular projects, ssr, i18n and firebase hosting.
@jamesdaniels How do you change the locale?
registerLocaleData
doesn’t seem to work for me. I assume the server should handle the language change. I tried following this setup: https://github.com/lostium/ssr-i18n-angular17, but I'm encountering an issue where dist/<project>/browser/<locale>/index.html
cannot load JS and CSS files because baseHref
is set to "". I tried adjusting the path with an additional postbuild
script, but that caused more problems.
After a few days of trying, I almost gave up, but then I found this issue. Honestly, it gave me some hope.
Hi I have tried some solutions to provide both i18n and server-side rendering but it seem firebase have limitation that baseHref of each locale must be "" so I can't figure way around this.
It will be nice if we can have solution for this kind of usecase.
Please submit feature requests through our support page.