0

我正在尝试用保加利亚语制作 Datetimepicker。我尝试了以下内容,但它仍然是英文的。我怎么能用保加利亚语做到这一点?

<script src="https://github.com/smalot/bootstrap-datetimepicker/blob/master/js/locales/bootstrap-datetimepicker.bg.js"></script>

$(function () {
    $('#datetimepicker5').datetimepicker({ language: "bg-BG" });
});
<div class='input-group date'  id='datetimepicker5'>
    <input type='text' readonly="true" placeholder="Дата" class="form-control" name="createdDate" data-date-format="YYYY-MM-DD" value="<?php echo set_value('createdDate'); ?>" />
    <span class="input-group-addon" id="triangle_span" >
        <span class="glyphicon glyphicon-triangle-bottom"></span>
    <span class="glyphicon glyphicon-triangle-top"></span>
</span>
4

1 回答 1

2

如果您查看 i18n 插件,它会说

$.fn.datetimepicker.dates['bg'] = {
...

所以

$('#datetimepicker5').datetimepicker({ 
   language: "bg" 
}); 

会做的伎俩,演示 - > http://jsfiddle.net/wm49Lv5x/

另外我认为你应该参考文件的“原始”版本,即

<script src="https://raw.githubusercontent.com/smalot/bootstrap-datetimepicker/master/js/locales/bootstrap-datetimepicker.bg.js"></script>

或者

<script src="https://rawgithub.com/smalot/bootstrap-datetimepicker/master/js/locales/bootstrap-datetimepicker.bg.js"></script>
于 2015-06-23T13:43:19.373 回答