我想添加新的语言。它是土库曼(tm)我花了很多时间,但我不能解决它请帮我解决它
PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))
LOCALE_PATHS = (
os.path.join(BASE_DIR, 'locale'),
)
gettext = lambda s:s
LANGUAGES = (
('ru', gettext('Russia')),
('tm', gettext('Turkmen')),
)
EXTRA_LANG_INFO = {
'tm': {
'bidi': False,
'code': 'tm',
'name': 'Turkmen',
'name_local': u"Turkmence",
},
}
import django.conf.locale
from django.conf import global_settings
import django.conf.locale
LANG_INFO = dict(django.conf.locale.LANG_INFO, **EXTRA_LANG_INFO)
django.conf.locale.LANG_INFO = LANG_INFO
global_settings.LANGUAGES = global_settings.LANGUAGES + [("tm", 'Turkmenche')]
1条答案
按热度按时间a11xaf1n1#
1.安装获取文本
django-管理员创建消息-l tm
django-admin编译消息