Open muffinresearch opened 9 years ago
I got this working: https://github.com/mozilla/payments-env/pull/44
But I don't want merge this until I know where the files are going. But just fiddling around the files should be pretty straightforward. Will update when mozilla/payments-ui#215 is done.
To be able to serve a localized version of payments-ui we need to add something to nginx to handle redirects based on accept-language headers.
See http://stackoverflow.com/questions/3657614/how-to-rewrite-location-in-nginx-depending-on-the-client-browsers-language
The benefit with the static route is it should be possible for someone to visit localized static content from the payments-ui tree and see it as it should be. Not to mention if running via pay.dev it should work with accept-language directly.
This looks like it might be worth a try https://github.com/fghibellini/nginx-http-accept-lang/blob/master/lang.lua
If doing it this way is a concern then we should probably look at some other solution e.g. some minimal additional service fronting the SPA.