Embedded Localization Files


Author
Message
Larry Caylor
Larry Caylor
StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K

I’ve just started using the Localization feature so I’m probably missing something, but here’s my problem.  My localization project works fine in SQL or external XML mode, but when I try to use Embedded XML files I loose the messages for Role Based Security. I know that Role Based Security is using embedded files and also contains a Messages_1033.XML file. How do I embed my projects files without messing up Role based Security?

-Larry

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
When you call StrataFrameApplication.RunApplication() (it's called within the Main() method of the Program.cs file), it cycles through all of the assemblies and on each assembly, it enumerates the embedded resources.  If the resources are "Messages_LocaleID.XML" or "MessageLanguages.xml" (I think), the values within them automatically get added to the localization values cache. 

So, I might can see where you would be getting just the security localized messages and not your own messages, but not the other way around... you might try hard-coding your LocaleID and see what happens.

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

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
I had to embed mine in code:

'Configura‡ões de idioma

MicroFour.StrataFrame.UI.Localization.MessageLocaleID = MicroFour.StrataFrame.UI.Localization.GetActiveLanguage("ProFilmeNET")

MicroFour.StrataFrame.UI.Localization.RegisterEmbeddedXmlFile(Reflection.Assembly.GetExecutingAssembly(), "ProFilmeNET.Message_Languages.xml")

MicroFour.StrataFrame.UI.Localization.RegisterEmbeddedXmlFile(Reflection.Assembly.GetExecutingAssembly(), "ProFilmeNET.Messages_1033.XML")

MicroFour.StrataFrame.UI.Localization.RegisterEmbeddedXmlFile(Reflection.Assembly.GetExecutingAssembly(), "ProFilmeNET.Messages_1046.XML")

And then all was fine.

Larry Caylor
Larry Caylor
StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K

Ivan,

 

Thanks for the suggestion, however my problem turned out to be self inflicted (as usual Pinch ). The solution I’m working on is broken up into three projects; a BO library, Windows Forms, and Active Reports. I originally placed the localization files in the Windows Forms project. Moving them to the BO project resolved the problem. I’m assuming that the weird result I was getting was due to the fact that the BO project doesn’t reference the Windows Forms project and therefore the localization files weren’t visible to the business objects. Since the Windows Forms project references the BO project, placing the files there made them visible to both projects.  I’m not clear on why that caused the Role Based Security messages to vanish, but right now I’m too tired to worry about it.

 

By the way, I saw the main form that you designed and posted. Looks good Cool 

 

-Larry

 

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
By the way, I saw the main form that you designed and posted. Looks good Cool 

 

Thanks Larry. Blush

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search