title: JavaScript Structure (or array or list) for Storing 1000s of Labels / localization standardization
body: <p>I have a scenario where there are many many programmers doing very rapid development and we are trying to get more consistency in our labels (words that actually display on the screen for customers).  We are in a transition where over the next few years we will be putting a new front-end on to all of our pages.  The new front end will be DHTMLX (a JavaScript framework).  So now is the perfect time to nail down this new process for consistency.</p>
  
  <p>We basically have 1000s of "key words" that are used many many times throughout 1000s of pages (its a very large product).  There has always been slight variations in spelling (especially shorthand).  So we would like to come up with a JavaScript structure to hold them all, and the programmer select the proper variable.  Something like this...</p>
  
  <pre><code>&lt;script&gt;
  
  /* This "w" structure stands for "word" and would hold all key words */
  var w = {
      /* This "l" structure stands for "long" and would hold all the long versions */
      l: {
          ai: "Action Item",
          bom: "Bill of Materials",
          cage: "CAGE",
          assy: "Assembly"
      },
      /* This "s" structure stands for "short" and would hold all the short versions */
      s: {
          ai: "AI",
          bom: "BOM",
          cage: "CAGE",
          assy: "Assy"
      }
  };
  
  //How a programmer would use a label...
  w.s.bom
  
  &lt;/script&gt;
  </code></pre>
  
  <p>I know some of you may say this shouldn't be handled in code but rather in the specs phase of development.  And you are right.  But put that aside for now.</p>
  
  <p>My question is: <strong>Can anyone think of a cleaner way to handle this?</strong>  I just gave just a 4 word example but there will end up being 1000s.  I'm also tossing around the idea of two associative arrays (one for long, another for short).</p>