﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Setting up Localization</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 09:28:19 GMT</lastBuildDate><ttl>20</ttl><item><title>Setting up Localization</title><link>http://forum.strataframe.net/FindPost2203.aspx</link><description>So, I went into the Localization &amp;amp; Messaging Editor, created a new project and added a text value for testing.&amp;nbsp; The key for the&amp;nbsp;text value&amp;nbsp;is "ParentTitle".&amp;nbsp; I then generated teh xml files, and verified they are going to the correct location.&amp;nbsp; In my InitApplication I have the following:&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;SetActiveLanguage(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"FactorSoft"&lt;/FONT&gt;&lt;FONT size=2&gt;, 1033)&lt;BR&gt;MessageXmlPath = CtlCommonPath &amp;amp; &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"\Data"&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;MessageKeyType = Messaging.MessageKeyDataType.XML&lt;BR&gt;MessageLocaleID = GetActiveLanguage(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"FactorSoft"&lt;/FONT&gt;&lt;FONT size=2&gt;, UserName)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;The necessary imports have been put in to make it more readable.&amp;nbsp; Since I only have one language set I shouldn't really need to do all of the Setting and Getting of ActiveLanguage, but I put it in there to make sure it is using the current LocaleID.&amp;nbsp; All of this executes fine, but when it goes to retrieve the text value of "ParentTitle" it says "The specified key [ParentTitle] was not found within the localization database."&amp;nbsp; Why is it looking in the database if I specified for it to look in the XML file?&amp;nbsp; What did I do wrong?&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Wed, 23 Aug 2006 13:14:00 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Setting up Localization</title><link>http://forum.strataframe.net/FindPost2406.aspx</link><description>Yup...sorry about that :blush:&amp;nbsp; You will be able to run in debug mode in a couple of weeks when we publish the source code for the 1.5 update.&amp;nbsp;</description><pubDate>Wed, 23 Aug 2006 13:14:00 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Setting up Localization</title><link>http://forum.strataframe.net/FindPost2400.aspx</link><description>Guess I can't run in debug after all.&amp;nbsp; I just removed and reinstalled and it's fine now.&amp;nbsp; Just had a little panic attack, but all is well.&amp;nbsp; Thanks :)</description><pubDate>Wed, 23 Aug 2006 11:48:08 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Setting up Localization</title><link>http://forum.strataframe.net/FindPost2399.aspx</link><description>Yes, you are correct.&amp;nbsp; You just need to load the install that you got from the training class back on your machine.&amp;nbsp; We have not released the source code for the new release yet.&amp;nbsp; Sorry. :ermm:</description><pubDate>Wed, 23 Aug 2006 11:39:55 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Setting up Localization</title><link>http://forum.strataframe.net/FindPost2398.aspx</link><description>Ok, jumped for joy too soon.&amp;nbsp; This did fix the localization thing, but after I compiled in debug mode I think I messed something up.&amp;nbsp; I think I had the new dll's from training on my machine, but I don't think I had the source code.&amp;nbsp; So, I think I compiled the wrong&amp;nbsp;(old) source code and now I'm getting error messages all over the place.&amp;nbsp; Where can I get the right source code, or how can I fix this?</description><pubDate>Wed, 23 Aug 2006 11:32:27 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Setting up Localization</title><link>http://forum.strataframe.net/FindPost2397.aspx</link><description>Ok, who wants to hit themselves?&amp;nbsp; It didn't recognize the path because&amp;nbsp;it assumes a backslash at the end.&amp;nbsp; I changed it to be &lt;FONT size=2&gt;Localization.MessageXmlPath = CtlCommonPath &amp;amp; &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"\Data\" &lt;FONT color=#1f5080&gt;and everything is working.&amp;nbsp; But on the bright side, I now have my StrataFrame code compiled in debug ;)&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Wed, 23 Aug 2006 11:10:54 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Setting up Localization</title><link>http://forum.strataframe.net/FindPost2329.aspx</link><description>OK, let me know what you find :)</description><pubDate>Mon, 21 Aug 2006 15:22:33 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Setting up Localization</title><link>http://forum.strataframe.net/FindPost2328.aspx</link><description>I do, I'll try and do that today if I get some extra time.&amp;nbsp; Thanks.</description><pubDate>Mon, 21 Aug 2006 15:21:01 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Setting up Localization</title><link>http://forum.strataframe.net/FindPost2325.aspx</link><description>Nothing special there... do you have the source code downloaded?&amp;nbsp; I'm wondering if you could build it in debug and step through it to see where it's failing.</description><pubDate>Mon, 21 Aug 2006 14:44:06 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Setting up Localization</title><link>http://forum.strataframe.net/FindPost2323.aspx</link><description>8/21/2006 10:26:23 AM&lt;BR&gt;Source: MicroFour StrataFrame Base&lt;BR&gt;Message: The specified key [ParentTitle] was not found within the localization database.&lt;BR&gt;Stack:&amp;nbsp;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Localization.RetrieveTextValue(String TextValueKey)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Localization.SetLocalizationOnControl(ILocalizable ControlToSet)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.OnLoad(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.OnCreateControl()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.CreateControl()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WmShowWindow(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ScrollableControl.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ContainerControl.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.WmShowWindow(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)</description><pubDate>Mon, 21 Aug 2006 14:24:26 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Setting up Localization</title><link>http://forum.strataframe.net/FindPost2321.aspx</link><description>Well, you have everything configured correctly... what is the stack trace for the exception that is being thrown when that key is not found in the files?</description><pubDate>Mon, 21 Aug 2006 14:09:32 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Setting up Localization</title><link>http://forum.strataframe.net/FindPost2310.aspx</link><description>I'm still having no success getting this setup.&amp;nbsp; It appears that the XmlPath is right, and I'm doing the following:&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;Localization.MessageXmlPath = CtlCommonPath &amp;amp; &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"\Data"&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;Localization.MessageKeyType = Messaging.MessageKeyDataType.XML&lt;BR&gt;Localization.MessageLocaleID = 1033&lt;BR&gt;MsgBox(Localization.RetrieveTextValue("ParentTitle"))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#008000 size=2&gt;I still get an error on the Retrieve saying it can't find ParentTitle as a key.&amp;nbsp; Is there possibly some step I'm leaving out when setting this up?&amp;nbsp; You guys have the XML files I've created and they seem to be right.&amp;nbsp; Is there anything else at all I can look at or try&amp;nbsp;here?&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Mon, 21 Aug 2006 10:35:00 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Setting up Localization</title><link>http://forum.strataframe.net/FindPost2290.aspx</link><description>I put in that code and i'm still getting the same message.&amp;nbsp; It doesn't seem to be finding that ParentTitle field for some reason.&amp;nbsp; I'm going to keep plugging away at it, but if you have any ideas let me know.</description><pubDate>Fri, 18 Aug 2006 15:55:32 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Setting up Localization</title><link>http://forum.strataframe.net/FindPost2211.aspx</link><description>Try this:&lt;/P&gt;&lt;P&gt;MessageXmlPath = CtlCommonPath &amp;amp; &lt;FONT color=#800000 size=2&gt;"\Data"&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;MessageKeyType = Messaging.MessageKeyDataType.XML&lt;BR&gt;MessageLocaleID = 1033&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;and see what happens...&lt;/P&gt;&lt;P&gt;The SetActiveLanguage call isn't what actually sets the current langauge that the localization is going to use... I think it pulls up the editor so the end-user can choose the language, or something like that.&amp;nbsp; The current language is chosen by the LocaleID property, so set that, set the MessageKeyType, and the XmlPath, and it should work.&lt;/P&gt;&lt;P&gt;As for the XML files, they look fine, and the PackageFile Trent was talking about was probably a typo for "ParentTitle."&lt;/P&gt;&lt;P&gt;Also, the exception's message is the same for if you're using XML files or the database, so don't worry about it.&amp;nbsp; If you get that message, then the key couldn't be found for the language you're currently using.</description><pubDate>Wed, 16 Aug 2006 15:02:00 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Setting up Localization</title><link>http://forum.strataframe.net/FindPost2208.aspx</link><description>Typo....I didn't see anything called MessageItems_1033.xml</description><pubDate>Wed, 16 Aug 2006 13:05:14 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Setting up Localization</title><link>http://forum.strataframe.net/FindPost2207.aspx</link><description>Here are the XML files...I didn't see anything called MessageItems_Languages.xml&amp;nbsp; Only Message_Languages.xml and Messages_1033.xml.&amp;nbsp; Maybe this is the problem?</description><pubDate>Wed, 16 Aug 2006 13:04:32 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Setting up Localization</title><link>http://forum.strataframe.net/FindPost2206.aspx</link><description>I removed the call to SetActiveLanguage.&amp;nbsp; I also checked my debug to make certain, but the path to the xml files is C:\Production\Data\.&amp;nbsp; So, I am attaching the 2 xml files I have there.&amp;nbsp; I see the ParentTitle key, but I see nothing about PackageFile...where would this come from?</description><pubDate>Wed, 16 Aug 2006 13:02:27 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item><item><title>RE: Setting up Localization</title><link>http://forum.strataframe.net/FindPost2205.aspx</link><description>First, you do not need to call SetActiveLanguage.&amp;nbsp; This is done in the GetActiveLanguage when settings the LocaleID.&lt;P&gt;Next, make sure that the XML files are are deployed to the [CtlCommonPath &amp;amp; &lt;FONT color=#800000 size=2&gt;"\Data"] &lt;FONT color=#4b6e9d&gt;location.. Do you have two backslashes?&amp;nbsp; Does the CtlCommanPath already have a backslash within in.&amp;nbsp; Next, manually open the XML file labeled "MessageItems_1033.xml" and see if the key PackageFile exists within the table.&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;FYI, whether it is coming from XML or the SQL Server database, it will still say "database." :)</description><pubDate>Wed, 16 Aug 2006 12:51:06 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Setting up Localization</title><link>http://forum.strataframe.net/FindPost2204.aspx</link><description>Here is the Stack Trace:&lt;/P&gt;&lt;P&gt;8/16/2006 12:50:17 PM&lt;BR&gt;Source: MicroFour StrataFrame Base&lt;BR&gt;Message: The specified key [ParentTitle] was not found within the localization database.&lt;BR&gt;Stack:&amp;nbsp;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Localization.RetrieveTextValue(String TextValueKey)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Localization.SetLocalizationOnControl(ILocalizable ControlToSet)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.OnLoad(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.OnCreateControl()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.CreateControl()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WmShowWindow(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ScrollableControl.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ContainerControl.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.WmShowWindow(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)</description><pubDate>Wed, 16 Aug 2006 12:50:31 GMT</pubDate><dc:creator>Andria Jensen</dc:creator></item></channel></rss>