【发布时间】:2020-02-12 15:22:58
【问题描述】:
我的 Vue 应用程序中有 Fullcalendar 并将语言设置为“da” 但它并不能翻译所有内容。
角落里的“今天”按钮没有翻译,其他的都翻译了。
我已尝试导入语言环境文件。 all 和 "da"。
import daLocale from '@fullcalendar/core/locales/da'
import allLocales from '@fullcalendar/core/locales-all'
我也尝试将“allLocales”直接放在<fullCalender> 标签上
<FullCalendar
class="demo-app-calendar"
ref="fullCalendar"
defaultView="dayGridMonth"
:plugins="calendarPlugins"
:events="calendarEvents"
locale="da"
:locales="allLocales"
/>
我已经尝试在<head> 中设置 CDN
<script src='fullcalendar/core/locales-all.js'></script>
<script src='fullcalendar/core/locales/da.js'></script>
我已经阅读了文档中的所有内容,并且在有关语言环境的文档中,它没有显示如何在 Vue.js DOCS
为了获得完整的翻译,我应该做任何其他设置吗?
【问题讨论】:
-
这里是稍微修改的官方演示,codesandbox.io/s/fullcalendar-vue-i9el9。它表明
locale="da" :locales="allLocales"按预期工作。如果你尝试 -
您不需要导入特定的语言环境和所有语言环境。
标签: vue.js fullcalendar locale fullcalendar-4