middleware.py
4.81 KB
-
Make new-style chinese language codes works for translation · 80e12705
The old-style chinese language codes used in django 1.4 series are now deprecated, as discussed here: https://code.djangoproject.com/ticket/18419. Although majority of browsers still use the old-style language codes, some new browsers such as IE11 in Windows 8.1 start to use the new-style names instead of old-style ones which makes the current chinese translations of edX can't work properly under these browsers. As there is no easy way for edX to change a higher version of django, I think we could do some mapping here so that the users who use IE11 in Windows 8.1 or other browsers that use the new-style names can view correct translations. Also, this fix will make users who use one of the language codes: zh-hk , zh-sg and zh-mo can see the correct translations.
louyihua committed