StrataFrame Forum

BrokenRules localization

http://forum.strataframe.net/Topic22805.aspx

By Jiri Brazda - 4/20/2009

Hi,

I need to set broken rules and corresponding texts to a particular language (e.g. Czech). In windows application in works fine since Czech texts are built into StrataFrame core. With the web application broken rules texts are still in English even when the localization is set to 1029 and all texts read from XML are in Czech version.

I set localization in Application_Start method in Global.asax file with the following code:

MicroFour.StrataFrame.UI.Localization.MessageKeyType = MicroFour.StrataFrame.Messaging.MessageKeyDataType.XML;

MicroFour.StrataFrame.UI.Localization.MessageXmlPath = ConfigurationManager.AppSettings["LocalizationFilesPath"];

MicroFour.StrataFrame.UI.Localization.MessageLocaleID = 1029;

Am I doing something wrong?

Thank You

Jiri Brazda

By Trent L. Taylor - 4/20/2009

Well, if this works in your WinForms and not in your web (which is what I am understanding you to say here) then it appears that you do not have all of your localization files distributed to the web.  Are you talking about custom keys or StrataFrame pre-built keys?
By Jiri Brazda - 4/21/2009

Yes it works in WinForms and not in web apps. I expect that it works in the same way as in WinForms - it uses pre-built text where available.

There is a little difference that in Windows applications I'm using localization files as embedded resources but in web apps I'm using XML files - as described above; the reason is that I was unable to work with embedded XML files - the following code has caused an exception:

MicroFour.StrataFrame.UI.Localization.RegisterEmbeddedXmlFile(System.Reflection.Assembly.GetExecutingAssembly(), "MyNamespace.Localization_Files.Message_Languages.xml");

By Trent L. Taylor - 4/21/2009

What pre-built text are you referring to here?  I can't think of anything that would apply on the web side.
By Jiri Brazda - 4/21/2009

Well here is the example: when I try to save a record with an empty field that is contained in required field collection, I receive the following message:

"This field requires entry."

My MessageLocaleID is set to 1029. In winForms application this text is localized automatically from built-in texts.

If this is not supported in web apps, I will do it manually...