Skip to content

[Feature] Implement Internationalization (i18n) for Backend Custom Error Messages #3520

Description

@VampireAchao

Search before asking

  • I had searched in the feature and found no similar feature requirement.

Description

Currently, our application's internationalization (i18n) is implemented only on the frontend, leading to a mismatch between the backend's custom error messages and the frontend's i18n messages. This can cause confusion for users who receive error messages that do not align with their selected language settings.

To address this, I propose that we implement a system where the backend sends error status codes rather than specific messages. The frontend would then be responsible for interpreting these status codes and displaying the corresponding i18n message. This would allow for a more consistent user experience and ensure that error messages are presented in the user's selected language.

Usage Scenario

Imagine a user who has set their language preference to Spanish. When an error occurs, the backend currently sends an error message in English. With the proposed system, the backend would send an error code, and the frontend would display the corresponding error message in Spanish, adhering to the user's language preference.

Related issues

No related issues found.

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions