-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Hi, I think Nakama needs localizable error messages (or/and for all messages from the API). Right now, all error messages are in English, and it is not good to show these messages to the end-user if their locale is not English. Yeah, we can use status/gdpc codes for some messages and use our own localization to show the error message, but for example it is hard to distinguish register error messages for the client; status & gdpc codes are the same:
Error during email authentication: ApiResponseException(StatusCode=400, Message='Invalid email address format.', GrpcStatusCode=3)
or
Error during email authentication: ApiResponseException(StatusCode=400, Message='Password must be at least 8 characters long.', GrpcStatusCode=3)
We can use regex, etc to parse this; but what if the message is changed in the future?
I think for now the best solution for this problem is to use a proxy while sending message to the client. But still, I don't like the approach. I really don't know if there is/are another solution(s) to this problem. I saw another similar request in here.
I believe the best solution is to make Nakama messages localizable and localize the messages in the server for client's locale. Or, maybe adding another field for the ApiResponseException; but this would be hard to use in complex messages (like if there are multiple variables in the message, etc).