Last updated April 6, 2012. Created by zahidansari on February 23, 2011.
Edited by vectoroc. Log in to edit this page.

<form action="?q=node/4376" method="post">
<select name="lang">
  <option value="">--Select Language--</option>
  <option value="mr">Marathi</option>
  <option value="or">Oriya</option>
  <option value="pa">Punjabi</option>
  <option value="ta">Tamil</option>
  <option value="te">Telugu</option>
  <option value="as">Asamese</option>
  <option value="bn">Bangali</option>
  <option value="ml">Malayalam</option>
  <option value="gu">Gujrati</option>
  <option value="hi">Hindi</option>
  <option value="kn">Kannda</option>
  <option value="ks">Ks</option>
</select>
<input type="submit" name="submit" value="filter"/>
</form>

<?php
include_once './includes/bootstrap.inc';
//drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
ini_set('display_errors', 1);
       
$select_lang = $_POST['lang'];
        if(
$select_lang=="")
          {
            
$select_lang='hi';
          }
        
$query = " select v1.title english_title,
                         v1.body english_content,
                         v2.title Hindi_title ,
                         v2.body Hindi_body,
                         v2.lang language_code
                         from  view_health_topic v1,view_health_topic v2
                         where v1.tid=v2.tid and v1.lang='en' and v2.lang = '"
.$select_lang."' " ;
           
$result = db_query($query);
 
//        echo $query;
           
echo "<table>";
            echo
"<tr><td><b>English title</B></td>
                            <td><b>English Body</b></td>
                            <td><b>Language</b></td>
                            <td><b>Title</b></td>
                            <td><b>Native language body</b></td></tr>"
;
          while(
$row = db_fetch_object($result))
           {
            echo
"<tr>";
            echo
"<td>".$row->english_title."</td>";
            echo
"<td>".$row->english_content."</td>";
            echo
"<td>".$row->language_code."</td>";
            echo
"<td>".$row->Hindi_title."</td>";
            echo
"<td>".$row->Hindi_body ."</td>";
            echo
"</tr>";
           }
           echo
"</table>";
?>

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.