简体   繁体   English

本地化Angular UI日历

[英]Localize Angular ui calendar

I'm building and agularjs application where I integrate angular ui calendar aka fullcalendar. 我正在构建和agularjs应用程序,我在其中集成了角ui日历又名fullcalendar。 I'm trying to tage advantage of its localization, but keeps getting an error. 我试图利用其本地化的优势,但不断出现错误。 I tried including both lang-all.js and also a specific locale for my language danish "da". 我尝试同时包含lang-all.js和我的丹麦语“ da”的特定语言环境。 As described in the documentation I placed the language script after the calendar itself . 文档中所述,我将语言脚本放在日历本身之后。

Both jquery and momentjs is included before this. 在此之前,jquery和momentjs都包括在内。 Is there any special language file etc. I need to get this working? 是否有任何特殊的语言文件等。我需要使其工作吗?

Best regards Rasmus 最好的问候拉斯穆斯

You need to import the language you want to use. 您需要导入要使用的语言。 You can also import all languages but then you need to specify what language you are using with the option lang 您也可以导入所有语言,但随后需要使用lang选项指定要使用的lang

See here: http://fullcalendar.io/docs/text/lang/ 参见此处: http : //fullcalendar.io/docs/text/lang/

<script src='fullcalendar/fullcalendar.js'></script>
<script src='fullcalendar/lang/sv.js'></script>
<script>

    $(document).ready(function() {

        $('#calendar').fullCalendar({...});

    });

</script>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM