Localization


Author
Message
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
Hiya.

I'm getting the following when trying to localize a label control. I have embedded the exported XML files for the message store, but still looks like the key is being searched into the database. Before embedding, I've tried to deploy it via DDT, and the same was happening. a

LocalizationKeyNotFoundException
 The specified key [teste1] was not found within the localization database.
KeyNotFoundException
 The message key [teste1] could not be found in the localization data.

Source     : MicroFour StrataFrame Base

Stack Trace:
   at MicroFour.StrataFrame.UI.Localization.ThrowKeyNotFoundException(String Key)
   at MicroFour.StrataFrame.UI.Localization.GetKeyRowFromXml(String Key)
   at MicroFour.StrataFrame.UI.Localization.RetrieveTextValue(String TextValueKey)
   at MicroFour.StrataFrame.UI.Localization.SetLocalizationOnControl(ILocalizable ControlToSet)
   at MicroFour.StrataFrame.UI.Windows.Forms.Label.InitializeObject()
   at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.InitializeFormLoadObjects()
   at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Thanks for any help.

Replies
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
Is there a size limit for the path ?

MicroFour.StrataFrame.UI.Localization.RegisterEmbeddedXmlFile(Reflection.Assembly.GetExecutingAssembly(), "C:\ProFilme.NET\ClientDotNET\ProFilmeNETSolution\ProFilmeNET\Localization Files\Message_Languages.xml")

MicroFour.StrataFrame.UI.Localization.RegisterEmbeddedXmlFile(Reflection.Assembly.GetExecutingAssembly(), "C:\ProFilme.NET\ClientDotNET\ProFilmeNETSolution\ProFilmeNET\Localization Files\Messages_1046.xml")


Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Oh...this is your problem here...it is expecting the internal path to the XML files... how it is referenced within the assembly.

This command should give you an array with all of your resource names as they appear within the assembly:

Reflection.Assembly.GetExecutingAssembly.GetManifestResourceNames()

Find the name of your localization files in there and then replace your paths.

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
Blush Sorry for the trouble Trent. I thought it was the address.

Now it worked fine! But only the labels.

I'm trying to send a localized message for deletion, for example. So I created a message key in the Common Repository and set the AutoDeleteMessageKey to it. This one isn't showing up.

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Is it not in the XML file that was created?  If not, I will have to take a look at the common repository.  You do have your project including the repository...correct?

Please let me know if the repository items are not showing up and I will get it fixed for you Wink

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
No, it is there, I open the .XML file and the message is there.
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
So did you set the message to use on the form?  You have to set the AutoDeleteMessageKey on the SF form...which from the sounds of it, you have already done....correct?  To check and see if it is still using the AutoDeleteTitle property instead of the key, change the AutoDeleteTitle property to "Testing" ... you should never see testing....it should show the AutoDeleteMessageKey message.
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
So did you set the message to use on the form?  You have to set the AutoDeleteMessageKey on the SF form...which from the sounds of it, you have already done....correct?

Correct.

To check and see if it is still using the AutoDeleteTitle property instead of the key, change the AutoDeleteTitle property to "Testing" ... you should never see testing....it should show the AutoDeleteMessageKey message.

Did it. It shows "Testing".

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
OK....I will have to look into this then.  Thanks for the info.
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
Thank you, Trent.

And don't worry, we know it's Ben's fault.

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
BigGrin Well at least you guys are learning BigGrin
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
Hi Trent.

I found out what Ben did ... BigGrinTongue

I was using a "Message" key, where it should be a "Text Value" key.

But one thing I still think is funny, when you have a Common Repository, the XML generated gets a bit mixed up. But I might find another Ben's mistake here ... hauhauhauhauhauhauhauhauhauha

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Well...it is important that you keep Ben in line...(even though I wrote that editor...he must have gone in and put in a gremlin or two ha ha Tongue )

He'll be back in the office on Monday so I will have to quit blaming him BigGrin

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Ivan George Borges - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Ivan George Borges - 19 Years Ago
Ivan George Borges - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Ivan George Borges - 19 Years Ago
                         Something must have gone wrong, because I have made this work in the...
Ivan George Borges - 19 Years Ago
                             You have to replace the second parm to the path where your XML files...
Trent L. Taylor - 19 Years Ago
                                 [quote][b]Trent L. Taylor (11/09/2006)[/b][hr]You have to replace the...
Ivan George Borges - 19 Years Ago
                             Is there a size limit for the path ?...
Ivan George Borges - 19 Years Ago
                                 Oh...this is your problem here...it is expecting the internal path to...
Trent L. Taylor - 19 Years Ago
                                     :blush: Sorry for the trouble Trent. I thought it was the address....
Ivan George Borges - 19 Years Ago
                                         Is it not in the XML file that was created? If not, I will have to...
Trent L. Taylor - 19 Years Ago
                                             No, it is there, I open the .XML file and the message is there.
Ivan George Borges - 19 Years Ago
                                                 So did you set the message to use on the form? You have to set the...
Trent L. Taylor - 19 Years Ago
                                                     [quote]So did you set the message to use on the form? You have to set...
Ivan George Borges - 19 Years Ago
                                                         OK....I will have to look into this then. Thanks for the info.
Trent L. Taylor - 19 Years Ago
                                                             Thank you, Trent. And don't worry, we know it's Ben's fault.
Ivan George Borges - 19 Years Ago
                                                                 :DWell at least you guys are learning :D
Trent L. Taylor - 19 Years Ago
                                                                     Hi Trent. I found out what Ben did ... :D:P I was using a "Message"...
Ivan George Borges - 19 Years Ago
                                                                         Well...it is important that you keep Ben in line...(even though I...
Trent L. Taylor - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search