How to display localized error messages in Super CSV

让人想犯罪 __ 提交于 2019-12-11 04:23:13

问题


My mother tongue is Spanish and I would like to know how to localize the error messages displayed by Super CSV's cell processors without compiling the source again.


回答1:


I know the idea for localizing error messages in Super CSV has been floating around for years now - it's just never had enough demand to warrant it (and not many other libraries support it either). I've used String.format for all exception messages throughout the code, so if we ever do add it it'll be relatively easy.

Your best bet (and you may or may not like this), is to copy the cell processors into your own project and modify the source to format the exceptions in Spanish (and just use your cell processors instead of the ones from Super CSV). That's probably a lot cleaner than trying to do some kind of mapping.



来源:https://stackoverflow.com/questions/26694605/how-to-display-localized-error-messages-in-super-csv

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!