mozilla/fxa-auth-server — pull request #365 by rfk (2013-11-29 03:07:05+00:00)
Title: Internationalisation of emails

(Ready for feedback but not for merge)

Here's a simple attempt at internationalization/localization of emails, as discussed in #308. Highlights:

* caller can specify preferred language in "lang" POST parameter or the "accept-language" header
* email templates have access to "gettext" helper which can suck in the relevant strings
* uses our own i18n-abide module under the hood (although it's not an ideal fit API wise)
* extensively localized for my local dialect ;-)

I'll do another pass on this next week and clean it up some more, but wanted to get it out there for initial feedback. @dannycoates @ckarlof f?

@ozten I did a little wrapper around i18n-abide to make the API more suitable for our purposes here. If you get a chance, please take a look and let me know if something like this could be pushed into the upstream API.