http://docs.ckeditor.com/#!/api/CKEDITOR.config
正如上面的API文档所述,如果lanaguage为空,ckeditor将显示默认语言所具有的语言。但我的申请显示了英语。
我的代码:
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' : '',
}}
我该怎么办?
发布于 2016-05-18 10:42:31
Django-CKEDITOR实际上通过使用setings.py的语言设置来重写此标志。您需要确保启用了下列所有设置:
# 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',
]https://stackoverflow.com/questions/37295120
复制相似问题