StrataFrame Forum

Pre-defined localization data for web

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

By Chan - 12/7/2008

Hi,

I have developed web based RBS in my application. I faced problem that, when I retrieve text/message of localized security data such as "SFSM_PasswordAuthenticationFailed", it returned msg_text in rtf format.



1. Are there any ready localization text for web?

2. I found that is MessageItem.IsHtml but I couldn't found any where to let me specify it.



Please advice. Thank you
By Ivan George Borges - 12/7/2008

Hi Chan.

Since you created your own web based RBS, I guess you could just add new keys to your Localization project in any way you wish.

By Chan - 12/7/2008

Hi,

Thank you for reply.

I am not adding any new text yet, instead I try to make sure all pre-defined framework localization data is "usable" for me in web environment. As I can see the data are all in rtf format, I would like to know if that is any in html format ready. I know I can change it myself, however I don't have resources to change 240++ records yet. Therefore, I post my question here.



Thank you
By Dustin Taylor - 12/9/2008

Chan,

No, the localization is not stored in HTML as they weren't designed to be used on the web. Your best bet for this would be to use an RTF to HTML converter on the existing Localization items to convert them into HTML for display. There are quite a few RTF to HTML converters available out there (a google serach for "vb.net RTF to HTML" returns more than enough options.) I believe we use a mixture for our own RTF to HTML conversions so I don't have just one to recommend to you, just whichever one works best for your needs. Once you have the coverter working once, it can be used on all keys, which saves you the leg work of converting them yourself.

By Trent L. Taylor - 12/9/2008

What Dustin said is true, but you can use the Text values if you want to embed HTML istead of RTF.  This is what we do.  For example, instead of using a Message, we will create a text value, add whatever HTML tags we need, and then pull the text value instead of the message.  The other option is to create a shared class that converts RTF to HTML...we have done this before as well.