-----Original Message-----From: knowledge@opentext.com [mailto:knowledge@opentext.com]On Behalf Of eLink Discussion: Development DiscussionSent: Tuesday, 14 May 2002 8:18 AMTo: eLink RecipientSubject: Editting Xlates programmatically? Editting Xlates programmatically? Posted by VIZDOMAdmin on 05/13/2002 06:16 PM We have some functionality that allows admins to edit a subgroup of xlates programmatically (from a link off of the admin page). This works fine in builder, but when when we run it outside of builder we get a variety of errors, everything from 'server did not respond', to no error, but no change either. Furthmore, from that point on subsequent calls to our module's XDB don't execute - we get weblingo pages with w/Xlate constants instead of text. Has anybody tried to do this/seen this/worked around it? I'm wondering if there is a notion of 'locking' of an XDB, and if so, if there is a way to programmatically unlock it when our module is started up. ThanksDawn Lambethdawn@vizdom.com
--------Livelink Appearance: the best way to skin Livelink.Contact hstoop@opentext.com for more information.
-----Original Message-----From: knowledge@opentext.com [mailto:knowledge@opentext.com]On Behalf Of eLink Discussion: Development DiscussionSent: dinsdag 14 mei 2002 10:27To: eLink RecipientSubject: RE RE Editting Xlates programmatically? RE RE Editting Xlates programmatically? Posted by eLink on 05/14/2002 04:27 AM In reply to: RE Editting Xlates programmatically? Posted by eLink on 05/13/2002 09:05 PM Message from Dave Kerrigan <dkerrigan@opentext.com> via eLinkIf you were to call this method from e.g. the startup script in your modulethen it would be set for all threads since each thread goes through the sameinitialisation process - just put a few 'echo()' in your script and you willsee this in each thread log.Dave Kerrigan====Message from Andrew Foti <afoti@opentext.com> via eLinkHi,I have recently experimented with dynamically changing the values of xlatesthis way:function void LLFont_Set(string newFont)String xlation = Undefinedstring groupName="WebDsp_Font"string stringName="SansSerif"if $XLateUtils.IsXlation( groupName, stringName )$XLateUtils.GetXlateGroup( groupName ).( stringName ) = newFontendendThis is not changing the original xlate, it is changing the memory value forthe current thread only - at restart, the change is lost. It is appliedimmediately but of course, there are several other threads out there whichstill have the original value - you would need to change this for all otherthreads, probably by reading the new value mapping from an ini file atrestart of services. I tested this as a service and it worked ok. I havenever done this in production so your mileage may vary.RegardsAndrew Foti-----Original Message-----From: knowledge@opentext.com [mailto:knowledge@opentext.com]On Behalf OfeLink Discussion: Development DiscussionSent: 14 May 2002 02:06To: eLink RecipientSubject: RE Editting Xlates programmatically?
-----Original Message-----From: knowledge@opentext.com [mailto:knowledge@opentext.com]On Behalf Of eLink Discussion: Development DiscussionSent: dinsdag 14 mei 2002 18:48To: eLink RecipientSubject: Thanks everyone for your suggestions. Our situation is a little different than... Thanks everyone for your suggestions. Our situation is a little different than... Posted by VIZDOMAdmin on 05/14/2002 12:44 PM In reply to: RE RE RE RE Editting Xlates programmatically? Posted by eLink on 05/14/2002 06:25 AM Thanks everyone for your suggestions. Our situation is a little different than the scenarios listed above. Basically we have a group in our module's XDB that maps mime types to 'user friendly' text for displaying with documents, i.e. application/msword becomes "Word document". We've built an admin function (accessed of the main admin.index page) to allow users to change those text mappings - i.e. "Word document" becomes "A fabulous document", etc. We also allow them to create new mime types, delete text mappings they've defined, etc. So we couldn't place the code to change the Xlates in init methods. I did notice this morning, however, that in the XLateUtils there are OpenXDB, LockXDB and UnlockXDB functions. It's not clear to me how they are to be used, but they seem like a reasonable thing to investigate. Thanks again for your help. Dawn