feat(i18n): add language support for registration, password recovery,… Integrated i18n support in MailService for email templates #1921
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Email Internationalization (i18n) Implementation
Hi
Hi team, I hope you’re all doing well! I noticed in the project requirements that there’s a need to enhance internationalization support, so I’ve put together this PR to address that.
This PR adds complete internationalization support for the email system and optimizes the code implementation, making it more concise and maintainable.
I’d love to get your feedback on how this fits with our goals!
Source of Requirements
Functional Improvements
1. Internationalization Support
2. Email Language Selection Logic
Implemented multi-level language selection logic:
x-custom-lang
)3. Code Optimization
MailService
andMailerService
to improve code readability and maintainabilityEmail Template Improvements
{{t 'key'}}
syntax to retrieve translated textAuthentication Process and User Experience
Testing
The internationalization functionality can be tested through the following methods:
language
parameter in the request bodyx-custom-lang
request header to specify the languageThis PR improves the user experience by ensuring email content aligns with users' language preferences while adding support for new languages to the system.
Thanks, best regards
test screenshots