StrataFrame Forum

Localisation Error

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

By Heinz Böttrich - 11/7/2006

Hello,



I have added a new Messaging/Localisation Project to my Application, and startet to translate the first Form.

Now the following error occurs wenn i run my Application.



LocalizationKeyNotFoundException

   The specified key [Article] was not found within the localization database.

FileNotFoundException

   The file [Message_Languages.xml] could not be found. The localization languages table could not be loaded.





The File Message_Languages.xml does exist, and there are 2 additional xml -Files (Messages_1033.XML+Messages_1031.XML) in my directory.



There is another Error, wenn i start the Message Editor and click on "Translation"



TargetInvocationException

   Ein Aufrufziel hat einen Ausnahmefehler verursacht.

BusinessLayerException

   The CurrentRow could not be evaluated because the CurrentRowIndex is out of range. Business object record count: 0. CurrentRowIndex: -1.



Source : mscorlib



Stack Trace:

bei MicroFour.StrataFrame.Business.BusinessLayer.get_CurrentRow()

bei SFMessaging.MessageTranslationProjectsBO.get_mtp_pk()

bei SFMessaging.TranslationProjectMaintenance.MessageTranslationProjects_Navigated(NavigatedEventArgs e)

bei MicroFour.StrataFrame.Business.BusinessLayer.NavigatedEventHandler.Invoke(NavigatedEventArgs e)

bei MicroFour.StrataFrame.Business.BusinessLayer.raise_Navigated(NavigatedEventArgs e)

bei MicroFour.StrataFrame.Business.BusinessLayer.OnNavigated(NavigatedEventArgs e)

bei MicroFour.StrataFrame.Business.BusinessLayer.Navigate(BusinessNavigationDirection Direction, Int32 AbsoluteIndex, Object[] PrimaryKeyValues, Boolean AttemptToCheckRules, Boolean IsRefill)

bei MicroFour.StrataFrame.Business.BusinessLayer.OnCurrentDataTableRefilled()

bei MicroFour.StrataFrame.Business.BusinessLayer.ChangeCurrentDataTable(DataTable NewTable, Boolean AcceptChanges, Boolean IsSharedTable)

bei MicroFour.StrataFrame.Business.BusinessLayer.FillDataTable(String SelectStatement)

bei SFMessaging.MessageTranslationProjectsBO.FillAll()

bei SFMessaging.TranslationProjectMaintenance..ctor()

bei System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)

bei System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)

bei System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)

bei System.Activator.CreateInstance(Type type, Boolean nonPublic)

bei SFMessaging.MessageMain.ShowForm(Type FormType)

bei SFMessaging.MessageMain.tsi_translations_Click(Object sender, EventArgs e)

bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)

bei System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)

bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)

bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)

bei System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)

bei System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)

bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)

bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

bei System.Windows.Forms.Control.WndProc(Message& m)

bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)

bei System.Windows.Forms.ToolStrip.WndProc(Message& m)

bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)




By Trent L. Taylor - 11/8/2006

LocalizationKeyNotFoundException
The specified key [Article] was not found within the localization database.
FileNotFoundException

This is occuring because your application is not setup to look for those messaging files in the correct location.  If you are using VB.NET then open the AppMain.vb file...C#, program.cs.  In either case, go to the InitApplication method and make sure to set your XML path:

MicroFour.StrataFrame.UI.Localization.MessageXmlPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location)

The above code will set the path to the same as the EXE that is being executed.

There is another Error, wenn i start the Message Editor and click on "Translation"

I just tested this without any translation packages and you are correct.  I will fix this and get a build out on the web.  Thanks for the tip.

By Trent L. Taylor - 11/8/2006

The error you were getting has been fixed.  You can download the latest version from the My Account area of the website.

http://www.strataframe.net/myaccount.aspx