Skip to content

I18n support for emails #2886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Hitabis opened this issue Oct 19, 2016 · 6 comments
Closed

I18n support for emails #2886

Hitabis opened this issue Oct 19, 2016 · 6 comments
Labels
type:feature New feature or improvement of existing feature

Comments

@Hitabis
Copy link

Hitabis commented Oct 19, 2016

At the moment all emails to the user are hardcoded in src/Controllers/UserController.js.

Has anyone a fork supporting other languages?
Are there any plans to implenent I18n in emails and html-files?

@natanrolnik
Copy link
Contributor

That's actually a good idea for a first PR, @Hitabis

@agent3bood
Copy link

Email adapter like mailgun have templates, cant you just add the language there?

@Hitabis
Copy link
Author

Hitabis commented Jan 23, 2017

@agent3bood the goal would be to have multiple languages. You could detect the language in the useragent for the html pages. It would be harder within the mails. But we always save the language in the installation.

@agent3bood
Copy link

@Hitabis does parse currently save the user language ?
If not that has to be added to the api first.
I imagine a possible solution to be

  1. Add api to set the user language , so we can use during registrations or what ever.
  2. On sending email get the language and send the appropriate email text to the user.

@johnnydimas
Copy link
Contributor

We were able to accomplish this with express middleware and using different email templates.

First we intercept the request:
app.use('/verify_email_success', _VerifyEmailSuccessRouter);

Then we get the user object and check their locale (our application saves locales), and then respond with the appropriate language template.

Hope that helps!

@mtrezza mtrezza added type:feature New feature or improvement of existing feature up for grabs and removed good first issue labels Nov 1, 2020
@mtrezza
Copy link
Member

mtrezza commented Jan 16, 2021

Email localization can now easily be accomplished with the Parse Server API Mail Adapter.

The adapter is still new, if you have any feedback for improvement or encounter any bugs, please file an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

5 participants