首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ckeditor语言出错“用户语言”

ckeditor语言出错“用户语言”
EN

Stack Overflow用户
提问于 2016-05-18 09:13:19
回答 1查看 776关注 0票数 0

http://docs.ckeditor.com/#!/api/CKEDITOR.config

正如上面的API文档所述,如果lanaguage为空,ckeditor将显示默认语言所具有的语言。但我的申请显示了英语。

我的代码:

代码语言:javascript
复制
 CKEDITOR_CONFIGS = {
'default': {
    'toolbar': 'Custom',
    'toolbar_Custom': [
      [ 'Bold', 'Italic', 'Underline', 'Strike' ],
      [ 'NumberedList', 'BulletedList', '-',  'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
      [ 'Table', 'HorizontalRule', 'Smiley'],
      [  'Format', 'Font', 'FontSize' ],
      [ 'TextColor', 'BGColor' ],
    ],
    'width' : '100%',
    'defaultLanguage' : 'ko',
    'language' : '',
}

}

我该怎么办?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-05-18 10:42:31

Django-CKEDITOR实际上通过使用setings.py的语言设置来重写此标志。您需要确保启用了下列所有设置:

代码语言:javascript
复制
# Internationalization
# https://docs.djangoproject.com/en/1.9/topics/i18n/

LANGUAGE_CODE = 'en'

LANGUAGES = [
    ('ko', _('Korean')),
    ('en', _('English')),
]

USE_I18N = True

MIDDLEWARE_CLASSES = [
   ...
   'django.middleware.locale.LocaleMiddleware',
]
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37295120

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档