php - 谷歌翻译问题与下拉
问题描述
我的网站使用谷歌翻译时出现问题,问题是当我选择英语以外的任何其他语言时,不是我的国家下拉列表中的所有记录都被翻译?
250 个国家/地区名称中的以下代码仅翻译顶部的 20 和底部的 10-15,但中间没有任何翻译
<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>
但是后来我尝试使选择字段 size="4" 如果我使用 size 属性并使下拉列表更大,那么一切都会被翻译。
这是什么奇怪的问题以及如何解决它?
这种方式可以工作,但我不希望使下拉大小更大。
<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>
谢谢
解决方案
推荐阅读
- sql - Google 的 BigQuery 中的“dom_content_loaded.histogram.bin.start/end”有什么区别?
- python - anaconda_build 教程在 MacOS High Sierra 上失败:未加载库:libcrypto.1.0.0.dylib
- javascript - Express.js 路由 404
- cloud-foundry - 在 Cloud Foundry 应用程序中保存和发布版本的最佳方式是什么?
- python - 为什么使用 networkx 库制作的图表看起来很乱?
- python - Python Pandas - 错误:只能比较标签相同的系列对象
- outlook - 是否可以根据 AD 属性在功能区中定位 Office 加载项?
- python-3.x - 带有标签的 Boto3 EC2 实例过滤器
- python - 获取特定月份中某个日期范围内的天数
- java - 如何为 Executor 选择线程数