禁用 Kendo Angular UI 中的本地化
我们一直在支持使用Angular 7开发的应用程序的本地化。我们几乎没有使用Kendo Angular UI网格的组件。
我们想始终将英语用于Kendo Angular UI组件。例如,Kendo Grid内部的日期格式试图加载某些地方并引发错误“错误:Nolocale:缺少'语言'的语言环境信息”。
我想通过禁用Kendo Angular UI组件的本地化来解决此错误。我知道我们可以包含Locale软件包来解决此错误,但是到目前为止,我们不想增加软件包的大小。
有没有办法禁用Kendo Angular UI组件的本地化?
谢谢你!
We have been supporting localization for our app developed using Angular 7. We have few components which use Kendo Angular UI grid.
We would like to always use English for the Kendo Angular UI components. E.g. date format inside Kendo grid tries to load some locales and throws error "Error: NoLocale: Missing locale info for 'language'".
I want to fix this error by disabling the localization for Kendo Angular UI components. I know we can include locale packages to fix this error but we don't want to increase the package size as of now.
Is there a way to disable the localization for Kendo Angular UI components?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我可以在 app.module.ts 的构造函数中设置 Kendo Angular Controls 的默认区域设置:
因此,我不是禁用本地化,而是使用这种方式覆盖应用程序中专门为 Kendo 组件设置的区域设置。
I could set the default locale for Kendo Angular Controls in my app.module.ts's constructor:
So rather than disabling localization, using this way I am overriding the locale set in my app specifically for Kendo components.