python-email-validator icon indicating copy to clipboard operation
python-email-validator copied to clipboard

Support other languages

Open jubuehrer opened this issue 1 year ago • 4 comments

At the time email-validator does not support other languages in its error messages. This leads us to check for the error messages and then replace them with our own messages which can be translated. This is just a hacky solution which is causing trouble, like in the newest version where some messages has changed.

We need this messages in English and German. But i think developers of other countries would love to see the error messages an their language as well :).

If needed I will assist you on this task to translate to German.

jubuehrer avatar Jul 03 '24 08:07 jubuehrer

I need Simplified Chinese, please.

As fact, we need an i18n enhancement.

BrentHuang avatar Jul 09 '24 08:07 BrentHuang

Thanks, ok, I'll try to work on this as I have time.

JoshData avatar Jul 09 '24 16:07 JoshData

A alternative for language support would be to just use status codes instead. That way every language is (kind of) supported.

jubuehrer avatar Nov 04 '24 08:11 jubuehrer

Many of the messages are interpolated with specific information from the input like an invalid character code, so a status code wouldn't solve the problem.

Probably each exception should be made it's own, meaningful class. I had resisted doing that in the past but it's probably the easiest first step to eventually getting to localized messages.

JoshData avatar Nov 04 '24 12:11 JoshData