<?php
$tt_page_info = array(
  'Page_Info' =>   array(
    'Title' => 'বাংলা কনভার্টার',
    'Description' =>'',
    'Keyword' => '',
  ),
  'Social_og' => array(
    'Image' => '',
    'Type' => 'website',
    'URL' =>  'bangla-converter/',
  ),
);
require_once('./header.php'); // Include Footer
?>
  <link rel="stylesheet" href="<?php echo $site_domain ?>assets/converter/css/main.css" type="text/css">
  <script type="text/javascript" src="<?php echo $site_domain ?>assets/converter/js/b2u.js"></script>
  <script type="text/javascript" src="<?php echo $site_domain ?>assets/converter/js/u2b.js"></script>
  <script type="text/javascript" src="<?php echo $site_domain ?>assets/converter/js/common.js"></script>
  <script type="text/javascript" src="<?php echo $site_domain ?>assets/converter/js/layout.js"></script>
  <script type="text/javascript" src="<?php echo $site_domain ?>assets/converter/js/count.js"></script>
  <script type="text/javascript" src="<?php echo $site_domain ?>assets/converter/js/main.js"></script>

  <div class="py-5 container">
     <div class="main">
         <div class="c_name">
             <h1 class="h2 text-center mb-2"> বাংলা কনভার্টার</h1>
         </div>
         <div class="converterBody">
             <form name="myForm" action="" method="post">
                 <div class="uniWrapper">
                     <textarea class="unicode_textarea" onKeyPress="return KeyBoardPress(event);" id=EDT onKeyDown="return KeyBoardDown(event);" name="textarea" onBlur="InputLengthCheck();" onKeyUp="InputLengthCheck();" autofocus="autofocus" value="" placeholder="ইউনিকোডের লেখা এখানে পেস্ট করুন"></textarea>
                 </div>
                 <div class="buttonWrap">
                     <div class="convert_button_center">
                         <span class="bijoy_button_div"><input class="bijoy_button" onclick="ConvertToTextArea('CONVERTEDT');" type="button" value="ইউনিকোড থেকে বিজয়" name="ConvertToAsciiButton"></span>
                         <span class="unicode_button_div"><input class="unicode_button" onclick="ConvertFromTextArea('CONVERTEDT');" type="button" value="বিজয় থেকে ইউনিকোড" name="ConvertButton"></span>
                         <span class="broken_button_div"><input class="broken_button" type="button" value="বিজয় ভাঙা ঠিক করুন" onclick="updateBijoy();"></span>
                         <span class="reset_button_div"><input class="reset_button" type="button" value="মুছুন" onclick="ClearInput();"></span>
                     </div>
                     <div class="dn">
                         <input readonly="" type="hidden" name="CharsTyped" size="2" style="font-weight:bold; border: 0px solid #2D69AE; color:#808080; text-align:left;" value="0">
                         <input readonly="" type="hidden" name="WordsTyped" size="3" style="font-weight:bold; border: 1px solid #2D69AE; color:#808080; text-align:right;" value="0">
                         <input readonly="" type="hidden" name="CharsLeft" size="8" value="100000">
                         <input readonly="" type="hidden" name="WordsLeft" size="8" value="100000">
                     </div>
                 </div>
                 <div class="bijoyWrapper">
                     <textarea class="bijoy_textarea" id="CONVERTEDT" autofocus="autofocus" value="" placeholder="বিজয় কি-বোর্ডের লেখা এখানে পেস্ট করুন"></textarea>
                 </div>
             </form>
             <div>
                 <h4>বাংলা বানান চেকার</h4>
                 <textarea id="bangla-text" style="min-height:300px;width:98%"></textarea>
                 <button id="spellCheck" class="bijoy_button">বানান চেক করুন </button>
             </div>
         </div>
     </div>
  </div>
  <script type="text/javascript">
  function ClearInput() {
      document.getElementById("EDT").value = '';
      document.getElementById("CONVERTEDT").value = '';
      document.getElementById("EDT").focus();
  }

  function updateBijoy() {
      var str = document.getElementById('CONVERTEDT').value;
      var res = str.replace(/  /g, " ");
      var res = res.replace(/šÔ/g, "š‘");
      var res = res.replace(/ ‡/g, " †");
      var res = res.replace(/¯Õ/g, "¯’v");
      var res = res.replace(/ÓQ/g, "”Q");
      var res = res.replace(/¯—/g, "¯Í");
      var res = res.replace(/¯-/g, "¯Í");
      var res = res.replace(/š—/g, "šÍ");
      var res = res.replace(/š-/g, "šÍ");
      var res = res.replace(/Ê/g, "Ð");
      var res = res.replace(/¯'/g, "¯’");
      var res = res.replace(/`ª“/g, "`ªæ");
      var res = res.replace(/y/g, "z");
      var res = res.replace(/«/g, "Ö");
      var res = res.replace(/“/g, "æ");
      var res = res.replace(/ ‰/g, " ˆ");
      var res = res.replace(/~/g, "‚");
      document.getElementById('CONVERTEDT').value = res;
  }
  </script>
  <link href="https://bangla.plus/banglaspeller.css" rel="stylesheet" />
  <script src="https://bangla.plus/banglaspeller.js"></script>
  <script>
      $("#spellCheck").click(function() {
          BanglaSpeller("#bangla-text");
      })
  </script>
<?php
require_once('./footer.php'); // Include Footer
?>
