Skip to content
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

Multi language support #27

Open
overbost opened this issue May 7, 2020 · 1 comment
Open

Multi language support #27

overbost opened this issue May 7, 2020 · 1 comment

Comments

@overbost
Copy link

overbost commented May 7, 2020

It is appreciate if the messages and the response will managed by a simple module.
This will allow to easy add languages and edit the error code in one place.
I implemented this features in my API and i will edit this project to allow the multi-languages and the error code manager, but i hope the project will update with this features.

@overbost
Copy link
Author

overbost commented May 9, 2020

This is my implementation (link expire in 30 days)
https://ufile.io/abwr1e38

It check if you pass "lang=en" in URL, then if there is "lang" in identity with flask-jwt-extended, default is "en"
There is "keys" file with the keys returned for specific errors
Strings is moved and managed in language files
This module should be extern to flask-validator because it can be used with other code outside

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant