I am having an issue with my website that uses google translator, the issue is when i select any other language other than English not all records from my country drop-down list gets translated?
The below code out of 250 country names translates just 20 on top and 10-15 at the botton but in between nothing gets translated
<div class="row form-group">
<div class="col-md-12">
<label class="sr-only" for="country">Your nationality? </label>
<select name="country" class="form-control">
<option value="" selected="selected" disabled="disabled">Your nationality? </option>
<?php
$stmt = $db->prepare('select * from country order by countryname asc');
$stmt->execute();
$row = $stmt->fetchAll(PDO::FETCH_ASSOC);
foreach($row as $rows){
?>
<option value="<?php echo $rows['countryname']; ?>" <?php if($country == ''.$rows['countryname'].'') echo 'selected="selected"'; ?>><?php echo $rows['countryname']; ?></option>
<?php
}
?>
</select>
</div>
</div>
But then i tried making the select field size="4" if i use size attribute and make the dropdown bigger then everything is getting translated.
What is this strange issue and how to get it sorted any idea?
This way it works but i do not wish to make the drop-down size bigger.
<div class="row form-group">
<div class="col-md-12">
<label class="sr-only" for="country">Your nationality? </label>
<select name="country" class="form-control" size="4">
<option value="" selected="selected" disabled="disabled">Your nationality? </option>
<?php
$stmt = $db->prepare('select * from country order by countryname asc');
$stmt->execute();
$row = $stmt->fetchAll(PDO::FETCH_ASSOC);
foreach($row as $rows){
?>
<option value="<?php echo $rows['countryname']; ?>" <?php if($country == ''.$rows['countryname'].'') echo 'selected="selected"'; ?>><?php echo $rows['countryname']; ?></option>
<?php
}
?>
</select>
</div>
</div>
Thanks