Multi-Language Validation Messages

Topics: Wish List Forum
Feb 10, 2007 at 7:22 PM
Would it be possible for us to add the ability to use language appropriate messages for failed validations? I'm not sure exactly how this may work but we may need to have the ability to point at a resource file instead of putting in a specific message. I think multi-language support is important though.
Feb 15, 2007 at 6:44 PM
I agree that multi-language support is needed. However, this poses some challenges with implementation because attributes only accept value types, constants, strings, types, and enums as parameters, which would make it difficult to pass in a reference to a resource file.

I guess one option is that instead of a message string parameter we could pass in a key string, which we could then look up in a config file or something. I don't know exactly, just sort of thinking out loud.
Feb 18, 2007 at 4:53 AM
I think that we can support resource file implementations of messages if we can solve one problem. From what I can tell we need to be able to get the following info into the custom attributes: resource file name, resource file location, message id and the culture desired. I think that the first 3 of those things are easily handled. The culture desired is the one that will possibly change call to call. I'm not sure exactly how we to handle that problem.

I don't have much experience using resource files so the answer to my problem might be rather simple.
Feb 19, 2008 at 7:49 PM
Although I am not at the stage where I would need EViL to be able to handle multiple languages, I think I would eventually. Definitely a worthy feature to an already fabulous package. If I get to that point where I need this feature and its not available, I will/would like to help with the coding and testing to accomplish it.