[AccessD] FW: Translation DB

A.D.Tejpal adtp at airtelmail.in
Sat Feb 28 12:58:06 CST 2009


John,

    It seems feasible to evolve a solution combining the best features of various alternatives put forth so far by you, Drew and Stuart. 

    Just to recapitulate, the salient points emanating so far have been:  
  
    (a) JWC - Minimize the size of collection to that for a single language for a single form. Existing data table (de-normalized) is used.

    (b) Drew - Load the complete collection for all forms, all languages on application start, using a specially created normalized table. This collection remains available throughout the session.

    (c) Stuart - Load the complete collection for all forms, all languages on application start, using the existing de-normalized table.

    I have sent a copy of my sample db named Form_ControlCapTranslation.zip to you and Rocky. On opening the start-up form F_SwitchBoard, a master collection gets generated through a persistent instance of class C_Captions via general module M_CaptionsInit. It is a one time operation and uses the existing de-normalized table.

    The master collection is composed of collection objects, one element per form featuring in CurrentProject.AllForms. In turn, each element of this master collection (representing one form), is composed of collection objects language-wise - for that form.
    
    With the above arrangement, the size of collection to be referred while updating the captions, is the barest minimum, confined to the single form in question, and restricted to the currently selected language, at the same time avoiding any need for rebuilding of collections.

    The master collection, once loaded at start, remains available for duration of the session and is finally cleared up on closing the start-up form. Class C_CaptionsMaster is used in modules of various forms for integrating the persistent instance of class C_Captions.

    As soon as language selection is carried out via the combo box located on the start-up form, captions on all currently open forms get updated immediately. Any form opened subsequently, will also conform to the currently selected language.

    John - I would like to add that you are doing a great job with your lecture series on classes. These have been of immense help in putting together this sample.

Best wishes,
A.D. Tejpal
------------

  ----- Original Message ----- 
  From: jwcolby 
  To: Access Developers discussion and problem solving 
  Sent: Wednesday, February 25, 2009 21:08
  Subject: Re: [AccessD] FW: Translation DB


  Rocky,

   > I just got another great solution from Jim Dettman, which you should take a look at.

  I am collecting solutions in a directory under the Classes documents I am writing.  Attach it to an 
  email to me and I will definitely take a look.

  Anyone else who wants can also send me their solution which uses Rocky's DB to actually perform 
  translations.  Can I make a request though, that everyone try to standardize the solution so that 
  there is a translation form with combos that allows the user to select a language and a form and the 
  form opens with translation applied.  That would make it easier to evaluate the various solutions.

  Please also note that for Rocky's use, an "on-the-fly" translation is required, i.e. translating the 
  forms in design view and storing them won't work (for him) so to make it apples to apples, your code 
  needs to translate as the form opens.

  I will add timer code to time the form's opening and post results so that everyone can see how the 
  various solutions work in terms of speed.  In fact I will build a test harness to time opening the 
  forms repeatedly, so that we get a "total time to open 100 times" or something similar.

  I already have solutions for Drew and Max.

  John W. Colby
  www.ColbyConsulting.com


More information about the AccessD mailing list