Sign in | Join
Last post 05-22-2009 1:54 AM by davidebb. 10 replies.
Sort Posts: Oldest to newest Newest to oldest
How can I localize or customize autogenerated validation error messages in DynamicData without setting validation attributes for every column (and possible error) in MetaData?So, insted of "The field <FieldNameHere> must be a valid Integer.", I would like to see "Kérem csak számot adjon meg a <FieldNameHere> mezőben." (which is "Please insert only numbers for <FNH> field.") for every Integer column.
Column DisplayNames are already localized so it's kinda funny when it says: "The Műcím field is required." (where Műcím is Title).
Thank You for helping!
This is a localizable string inside Dynamic Data. If you run the Hungarian version of the framework, that string should be localized.
Unfortunately I can't replace the .Net framework on the server. Anyway, I don't like the localized version because it's hard to search for the compiler's error messages.What about customization or if I have a globalized app?I'm using the 4.0 Preview 4, can it help?
You know hungarian? : )
ricka6:If you run the Hungarian version of the framework, that string should be localized.
Hi Rick, I though with web if the user was using a Hungarian or French browser there should be a way of having the validation error messages appear in there own language (parden me if I completely miss it I18N is relativly new to me), I've been trying to help FTeR via my blog but I was getting nowhere so I pointed him here
>>You know hungarian? : )
That was actually David Ebbo's response when I sent him the question. I guess he must know some.
Steve is right, the client side error messages will be localized by the client user agent (IE, FF, Chrome, etc).
The browser's preffered language is set to Hungarian (prtscr). I also set EnableScriptGlobalization="True" and EnableScriptLocalization="True", for the script manager.Maybe I'm still missing something.
David states this should work in the released version - but the preview is not localized. You'll always get English in the previews. Sorry about that - resource constraints.
Is there no way to overwrite some method or property? It would still be quicker then separately set every column.
One thing you can try is to change the field templates to set the ErrorMessage to what you want on the various validators after the calls to SetUpValidator().
David
That is a good idea! Thank You!
If You don't mind my curiosity, how do you recognized Hungarian? It's not a widely spoken language.
Well, to be honest, I wasn't 100% sure it was Hungarian, so it was a partial guess. Maybe the 'sz' sequence felt Hungarian :)