title: PHP - Virtuemart 2.X and Joomla 2.5x - New Virtuemart Table Structure
body: <p>I have written an extension for Virtuemart 1.1.9 which retrieves products from the virtuemart database. This primarily uses the '#__vm_product" table.</p>
  
  <p>Now that I have started to write a Virtuemart 2.x compatible version I have some questions.</p>
  
  <p>I have noticed that my product table containing the product names is in "#__virtuemart_producs_en_gb"</p>
  
  <p>I am assuming that virtuemart has detected my language during install, and created these tables with the "en_gb" suffix automatically.</p>
  
  <p>My questions are:</p>
  
  <p>What is the best way to detect what the suffix is likely to be on these product tables, as I am assuming that the suffix could be anything in theory, "en_us" for example, or "fr"?</p>
  
  <p>Is there a config value I can search for which contains this language setting?</p>
  
  <p>Any ideas about the best way to tackle this issue?</p>
  
  <p>Regards</p>
  
  <p>James</p>