翻译动态异常消息?
我有一些代码可以捕获异常并将其显示给用户。例如,消息是Field is NULL: Account。由于我不想显示技术错误消息,我一直在寻找一种将其翻译成另一种语言的方法(用户将是德语),所以我无法显示帐户,我需要Konto 例如。因此,我想将 Field is NULL: Account 替换为普通用户更容易理解的内容。有什么好的方法吗?我可能有一些 resx 文件,只是说缺少一个字段,但它没有告诉是哪一个。
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论