无法用保加利亚语制作Bootstrap Datetimepicker

时间:2015-06-22 20:12:50

标签: twitter-bootstrap datetimepicker smalot-datetimepicker

我正在尝试使用保加利亚语制作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>

1 个答案:

答案 0 :(得分:2)

如果你看一下i18n插件,就说

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

所以

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

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

另外我认为你应该参考&#34; raw&#34;该文件的版本,即

<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>