Hindi Typing in Text Box

File Name :

<!-- https://hinkhoj.com/api/ -->
<!-- <script src="https://hinkhoj.com/common/js/keyboard.js"></script>
<link rel="stylesheet" type="text/css" href="https://hinkhoj.com/common/css/keyboard.css" /> -->
<script src="<?php echo base_url() ?>assets/js/keyboard.js"></script>
<link rel="stylesheet" type="text/css" href="<?php // echo base_url() ?>assets/css/keyboard.css" />

<div class="form-group row">
<label for="input_full_name_hindi" class="col-sm-6 col-form-label">१.&nbsp;&nbsp;आवेदक का नाम (हिंदी में) <span class="required" aria-required="true"> * </span></label>
<div class="col-sm-6">
<!-- <input type="text" class="form-control" id="full_name_hindi" name="full_name_hindi" value="<?php echo set_value('full_name_hindi'); ?>" placeholder="आवेदक का नाम (हिंदी में)" maxlength="64" onkeyup="ValidateChar_limit(this.id)"/> -->
<script language="javascript">
CreateHindiTextBox("full_name_hindi");
//CreateCustomHindiTextBox("full_name_hindi","",60,false);
</script>
<span class="required" style="color:green;" id="full_name_hindi_err" aria-required="true"></span>
<span class="required" id="error_msg_full_name_hindi" aria-required="true"></span>
<span class="error"> <?php echo form_error('full_name_hindi'); ?> </span>
</div>
</div>


<script type="text/javascript">
$(document).ready(function () {
$("#full_name_hindi").addClass("important form-control");
$("#full_name_hindi").attr("placeholder", "आवेदक का नाम (हिंदी में)");
bsCustomFileInput.init();
});
</script>



helper function

File Name :

function translatetext($text){
$curlSession = curl_init();
curl_setopt($curlSession, CURLOPT_URL, 'https://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=hi&dt=t&q='.urlencode($text));
curl_setopt($curlSession, CURLOPT_BINARYTRANSFER, true);
curl_setopt($curlSession, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($curlSession);
$jsonData = json_decode($response);
curl_close($curlSession);

if(isset($jsonData[0][0][0])){
return $jsonData[0][0][0];
}else{
return false;
}
}

File Name :

<tr>
<td><?php echo translatetext('Applicant Name'); ?> / Applicant Name </td>
<td> <?php echo ucfirst($applicant['candidate_name']);
// echo translatetext($applicant['candidate_name']);
?>
</td>
</tr>





Previous Next


Trending Tutorials




Review & Rating

0.0 / 5

0 Review

5
(0)

4
(0)

3
(0)

2
(0)

1
(0)

Write Review Here