I want to internationalize my application. How should I write messages passed to my exception class constructor? I'd like to be able to configure only one file and it can be used for various international languages, like Chinese, French etc.
preguntado el 12 de junio de 12 a las 15:06
Exception handling shouldn't be internationalized. Internationalization should be in the display layer, once you've caught the exception, and passed the relevant information on for display. The string you pass up in the exception should just be a key, which is used internally to look up the message; additional information should be passed in separate fields in the exception.