django,i18n,更改Lanaging_code后翻译问题
我使用Django I18N创建了一个多语言网站。但是后来,我需要将默认语言(language_code ='ru')更改为语言配置设置的一种(现在是Laganslaging_code ='uk')。
之后,当用户打开此站点并选择语言“ ru”时,翻译无法正常工作。这些模型可以正确翻译,但模板仍保留在“英国”中。
同时,当用户打开本网站并选择“英国”语言或“ en”语言时,翻译无问题。
请告诉我,我的原因是什么,我该如何解决这个问题,或者至少在哪里可以搜索?
I have created a multilingual website using Django i18n. But later I needed to change the default language (before LANGUAGE_CODE='ru') to one of those that were in the LANGUAGES configuration setting (now LANGUAGE_CODE='uk').
After that, when the user opens this site and selects the language 'ru', the translation does not work correctly. The models translate correctly, but the templates remain in 'uk'.
At the same time, when the user opens this website and selects the language 'uk' or 'en', the translation works without problems.
Tell me please, what is the reason and how can I solve this problem, or at least where it would be reasonable to search?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题在于,从俄罗斯向俄罗斯人的翻译尚未完成,因此从俄罗斯译成乌克兰人的翻译就被采取了。
虽然默认值为俄罗斯人,但根本没有翻译,因为默认语言中没有翻译到该节点的翻译。当它成为乌克兰人时,在没有翻译的情况下,开始使用翻译为乌克兰人。
The problem was that the translation from Russian into Russian was not completed, so the translation from Russian into Ukrainian was taken.
While the default was Russian, no translation was made at all, since there is no translation to this node in the default language. And when it became Ukrainian, in the absence of a translation, translation into Ukrainian began to be used.