Hi,
Is anyone having the same problem:
When I change LANGUAGE_CODE to 'zh_Hans' in settings, and was trying to run server. An IO Error occurred.
IOError: No translation files found for default language zh_Hans.
Thanks!
Hi,
Is anyone having the same problem:
When I change LANGUAGE_CODE to 'zh_Hans' in settings, and was trying to run server. An IO Error occurred.
IOError: No translation files found for default language zh_Hans.
Thanks!
This is support question, not development discussion. Please be more careful when starting threads.
Solved by myself.
Should be 'zh-hans' instead of 'zh-Hans'.
@rafalp Excellent work. May need a small change in Misago 0.8.0 release post.
Nice catch, I've updated release announcement.
Thanks!
Thanks a lot for replying me.
I think this is not the answer of my problem.
my issue is here, misago-project.org/t/after-setting-the-language-to-chinese-i-meet-a-problem-i-can-not-solve-plz-help-me-with-that/439/
Before I start the thread, I changed the settings.py with both LANGUAGE_CODE = 'zh-hans' and LANGUAGE_CODE = 'zh-Hans', the problem remains the same.
My problem is when I open the site some text show as Chinese firstly, after about 500ms, it shows English again. for example, the texts All My New Unread Subscribed Unapproved.
With the debug tool of Chrome, I think maybe some js script rewrite the text to English. What can I do about it?
Manually renamed zh_Hans to zh_hans in /site-packages/misago/locale. Solved.
Same problem here. Even when I set zh_hans
, I get OSError No translation files found for zh_hans.
Yeah, thats bug then. How other django packages handle it? Is that lang named zh_hans
in them too?
Thanks for your reply, but above did not solve my problem.
My problem is when I open my site, some texts of my page show as Chinese, then then changed to English after about 500~1000ms.
Here is the setting I have changed.
LANGUAGE_CODE = 'zh-Hans'
USE_I18N = True
USE_L10N = True
Did not solve my problem. I have only changed the setting about language to bellow:
LANGUAGE_CODE = 'zh-Hans'
whether I change /site-package/misago/locale/zh_Hans to zh_hans, the problem remains same.
Allright, I've checked this and I'm bummed out.
Manually renamed zh_Hans to zh_hans in /site-packages/misago/locale. Solved
zh_Hans
is how it should be named according to Django's 1.11 source code and it works for me:
github.com/django/django/tree/stable/1.11.x/django/contrib/admin/locale/zh_Hans
LANGUAGE_CODE = 'zh-Hans'
This works for me on localhost. Entire forum is in Chinese now.
I'm running MacOs Sierra. What OS are you guys running? What Django versions? Is this python manage.py runserver
or proper setup with wsgi container?
Hi, here is my setup.
And here are weird things.
LANGUAGE_CODE = 'zh-Hans'
, site-packages/misago/locale/zh_Hans
: OS Error, no translation files found for zh_Hans.
LANGUAGE_CODE = 'zh-Hans'
, site-packages/misago/locale/zh_hans
: Good.
LANGUAGE_CODE = 'zh-hans'
, site-packages/misago/locale/zh_hans
: Good, too.
Maybe django version problem in Debian?
However the right two setups also have a small bug at users/active-posters/
:
LANGUAGE_CODE = 'zh-Hans', site-packages/misago/locale/zh_Hans: OS Error, no translation files found for zh_Hans.
This forum, LANGUAGE_CODE = 'zh-Hans'
, running latest Debian:
This forum, LANGUAGE_CODE = 'zh-hans'
:
Zero errors as you guys can see.
But, hey @dollar, I've found out that Misago's JS language is aggressively cached by the browsers and I've had to clear cache for browser to download english language translations after it got fixated on chinese lang, so I'm guessing I'll add cachebuster to i18n links. ;)
I've been planning to release 0.10 when some features are implemented, but it's delayed long enough, so I'll ship what I've got so far as 0.10 later today.
This post is hidden. You cannot see its contents.
Hidden by rafalp on Aug. 15, 2017, 4:37 p.m..
@WayneChen I've made your post in this thread invisible per forum rules:
This is English speaking forum. Posts in languages other than English will be removed.
If you wish to participate in discussion, please post messages that are understandable to all members of this community.
Thanks!