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