Back

translation of error messages

  • 0
  • Cloud
zrg0
20 May, 2024, 16:51

I'm building a multi language app. I call this function: await account.create(ID.unique(), email, password);

two use cases are wrong params for account creation. i get these responses:

Invalid email param: Value must be a valid email address type: general_argument_invalid code: 400

Invalid password param: Password must be between 8 and 265 characters long, and should not be one of the commonly used password. type: general_argument_invalid code: 400

a) is there an option to pass language to appwrite functions to get error messages in all languages? b) can there be returned unique codes, so one code correspond to one error message c) how else can i translate this?

TL;DR
- Developer building multi-language app with error messages in English. - Wondering if language can be passed to get error messages in all languages. - Wants unique codes for each error message. - Translate error messages in other ways. Solution: - Appwrite doesn't support passing language for error messages yet. - As a workaround, create a dictionary of error codes and corresponding messages in different languages for translation.
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