我有fullcalendar的問題,因爲不顯示按鈕prev,下一個,標題和事件中的特殊字符(è,±,ñ)..這是在zend views中實現phtml。到處都是特殊字符(菜單,新聞等)。我已經設置了字符集UTF-8 ..爲什麼這不起作用?我使用lang包 - 波蘭文fullcalendar。請幫幫我!fullcalendar jquery,不顯示特殊字符(ę,±,..)
查看腳本:
<?php $this->headLink()->appendStylesheet('/fullcalendar-2.1.1/fullcalendar.css'); ?>
<?php $this->headLink()->appendStylesheet('/fullcalendar-2.1.1/fullcalendar.print.css', 'print'); ?>
<?php $this->headScript()->appendFile('/fullcalendar-2.1.1/lib/moment.min.js'); ?>
<?php $this->headScript()->appendFile('/fullcalendar-2.1.1/fullcalendar.min.js'); ?>
<?php $this->headScript()->appendFile('/js/lang.all.js'); ?>
<?php $this->headScript()->captureStart(); ?>
var calendar_elements = [
<?php foreach($this->events as $event): ?>
{
title: '"<?php echo str_replace('\'','\\\'',$event['name']); ?>"',
start: '<?php echo $event['date']; ?>',
editable: false,
},
<?php endforeach; ?>
];
<?php $this->headScript()->captureEnd(); ?>
<div class="row">
<div class="col-sm-12"><div id='calendar'></div></div>
</div>
<script>
$(document).ready(function() {
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
lang: 'pl',
editable: true,
eventBackgroundColor: 'red',
eventLimit: true, // allow "more" link when too many events
events: calendar_elements,
});
});
</script>
你在哪裏設置的字符集? – skobaljic 2014-11-14 14:15:02
我在application.ini中設置了字符。我嘗試在佈局作爲元,不工作太.. – programmer2014 2014-11-14 14:38:40
@ programmer2014:你的項目在utf-8?你可以嘗試檢查/js/lang.all.js中的波蘭語翻譯,看看是否還有特殊字符(在UTF-8編輯器中) – Sefran2 2014-11-14 15:00:32