SetActiveLanguage(
The necessary imports have been put in to make it more readable. 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. 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." Why is it looking in the database if I specified for it to look in the XML file? What did I do wrong?
MessageXmlPath = CtlCommonPath & "\Data"MessageKeyType = Messaging.MessageKeyDataType.XMLMessageLocaleID = 1033
and see what happens...
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. The current language is chosen by the LocaleID property, so set that, set the MessageKeyType, and the XmlPath, and it should work.
As for the XML files, they look fine, and the PackageFile Trent was talking about was probably a typo for "ParentTitle."
Also, the exception's message is the same for if you're using XML files or the database, so don't worry about it. If you get that message, then the key couldn't be found for the language you're currently using.