Back

Translate auth error messages

  • 0
  • Users
  • Locale
gresakg
19 Jun, 2023, 10:27

I'd like to localize auth based error messages like "Invalid credentials. Please check the email and password." Since setting the locale didn't work I checked the translations folder on github, but it seams this strings are not translatable? Is that correct?

TL;DR
The user is requesting help in translating error messages in an authentication system. They mention that error codes would be helpful and express hope for future software translation. The user has found that the server always sends error messages in English. They provide a link to error codes and another link to a file containing error messages. They mention that setting the locale did not work and ask if the error messages are untranslatable. The user is specifically interested in translating the error message "Invalid credentials. Please check the email and password." Solution: The error messages sent from the server are in English and are not directly translatable on the client side. However, error
Deleted User
19 Jun, 2023, 14:58

The error that is sent back from the server is always in English.

You can see here all the errors https://github.com/appwrite/appwrite/blob/master/app/config/errors.php

If they would change you will the new one in that file so the best use-case would be to translate them on the client side.

gresakg
20 Jun, 2023, 05:57

Thanks! Error codes would come handy in this case. I hope in the future the whole software will be translated.

Drake
20 Jun, 2023, 16:01

Every exception will have a type, so you can decide what to output based on the type.

https://appwrite.io/docs/response-codes#errorTypes

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more