Multiple Languages From a Stream [RESOLVED]

SyntaxEditor for Windows Forms Forum

Posted 18 years ago by Scott Waletzko
I purchased this product today after using the trial version and have been nothing but impressed. Great work!

I searched the documentation and the forums and didn't see anything about this, but I would imagine that it's been addressed before, so I apologize for not being able to find it myself. What I am interested in doing is loading the "ActiproSoftware.HTML.xml" language specifications file that is supplied with the example projects from a stream, but cannot because of the other files it depends on (CSS, VBScript, JavaScript). The help file alludes to another way (as opposed to loading them from disk) to load multiple languages, but as I said I can't figure it out.

How can I load Xml language instructions that have child instructions from a stream?

Thanks in advance for your help!

[Modified at 05/19/2006 08:48 AM]

Comments (2)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Scott,

What you can do is after you have your language loaded, save it back out to a file. That file will include all of the language definitions in the single file. Our sample app even allows you to do that (Save to Encrypted XML menu item). Just make sure you use the same encryption key or set it to 0 in our app to keep the output unencrypted.

Once you have it in a single file you can persist it to a database or resource.

Actipro Software Support

Posted 18 years ago by Scott Waletzko
Excellent solution, I will try that today. Thanks for the quick reply!

One caveat to this approach that I thought I'd share in case someone else comes across this post: before you run the sample project (after changing the EncryptionKey variable to "0") you have to edit the source language files in the sample project and change the "Secure" attribute in the "SyntaxLanguage" element to "False", or else an error occurs when trying to save the language file unencrypted.

[Modified at 05/19/2006 10:34 AM]
The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.