Setting up Localization


Author
Message
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
So, I went into the Localization & Messaging Editor, created a new project and added a text value for testing.  The key for the text value is "ParentTitle".  I then generated teh xml files, and verified they are going to the correct location.  In my InitApplication I have the following:

SetActiveLanguage("FactorSoft", 1033)
MessageXmlPath = CtlCommonPath &
"\Data"
MessageKeyType = Messaging.MessageKeyDataType.XML
MessageLocaleID = GetActiveLanguage(
"FactorSoft", UserName)

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?


Reply
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
Try this:

MessageXmlPath = CtlCommonPath & "\Data"
MessageKeyType = Messaging.MessageKeyDataType.XML
MessageLocaleID = 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.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Andria Jensen - 20 Years Ago
Andria Jensen - 20 Years Ago
Trent L. Taylor - 20 Years Ago
Andria Jensen - 20 Years Ago
Andria Jensen - 20 Years Ago
Andria Jensen - 20 Years Ago
StrataFrame Team - 20 Years Ago
Andria Jensen - 20 Years Ago
Andria Jensen - 20 Years Ago
StrataFrame Team - 20 Years Ago
Andria Jensen - 20 Years Ago
StrataFrame Team - 20 Years Ago
Andria Jensen - 20 Years Ago
             OK, let me know what you find :)
StrataFrame Team - 20 Years Ago
Andria Jensen - 20 Years Ago
Andria Jensen - 20 Years Ago
Trent L. Taylor - 20 Years Ago
Andria Jensen - 20 Years Ago
Trent L. Taylor - 20 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search