It is using Portuguese (Portugal) as default.
Yeah currently work like this:
try:
language, enc = locale.getdefaultlocale()
language = language.split("_")[0]
except Exception:
language = "en"
We could add an exception for pt-br or we could remove the language "autodetect" part, start in english by default and let the users to pick the language if they want.
could remove the language "autodetect" part, start in english by default and let the users to pick the language if they want
Never do it, or newbie users will be confused, and you need them.
Like Windows needed Start menu for newbies.
We could add an exception for pt-br
Or auto detect languages that haves a suffix, for sample, traditional and simplified chinese.
Added in latest rev: https://github.com/HelloZeroNet/ZeroNet/commit/b089355b5ac08e600f1b9fdc5ac12d6c5e15b19d
I was unable to test, so it would be helpful if you can confirm the detection on a new installation
You could make it more generic instead of directly refering to pt-br, also to support chinese and traditional chinese. There are other languages with country variation.
@HelloZeroNet @shortcutme
I tested it (removing the language line on config file) and it is yet using pt language instead of detecting pt-br
Can you please check the output of:
C:\>python
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getdefaultlocale()
('hu_HU', 'cp1250')
I tested it, and it works.
Thanks