开发者

Translate dynamic exception messages?

开发者 https://www.devze.com 2023-01-11 19:41 出处:网络
I have some code which catches an exception and displays it to the user. The message is Field is NULL: Account for example. Since I dont want to display technical 开发者_如何转开发error messages I was

I have some code which catches an exception and displays it to the user. The message is Field is NULL: Account for example. Since I dont want to display technical 开发者_如何转开发error messages I was looking fir a way to translate this to another language (the users will be German), so I cant display Account, I need Konto instead for example. So I want to replace Field is NULL: Account with something which is easier to understand for the normal user. Whats a good approach to this? I could have some resx files and just say A field was missing, but its not telling which one.

Thanks

0

精彩评论

暂无评论...
验证码 换一张
取 消