ChewbaccaOriginal post
Rank 1: Thread
Hi, how can I make a snackbar with a changed error text when registering with catch (e)? I want to translate the error text.
Summary
Solution:
To change the error text displayed in a snackbar during registration, you can create a function to translate the error message. Firstly, you need to refer to the error type documentation provided (https://appwrite.io/docs/response-codes#errorTypes) to get the specific error types you want to translate.
Next, using the example code provided, you can create a function in your code that takes in the error message as a parameter and returns the translated version of the error.
Here is an example code snippet in Dart:
```dart
String errorToMyLang(String error) {
switch (error) {
case '