feat: add --default_lang / PAIR_DEFAULT_LANG to set default language
Testing
test is included, but you can also test by:
1) start server
2) using websocket client of choice, connect to channelserver (e.g.
$ wsdump.py --headers "Accept-Language:-" ws://localhost:8000/v1/ws/
3) check output logs of server and see info debug statement:
{"Logger":"channelserver-1.0.0",... "Fields":{"msg":"No location info for IP","lang":"[\"en\"]","remote_ip":"127.0.0.1"}}
if desired, you can start the server with PAIR_DEFAULT_LANG="de" and perform the same ws client call and see the "lang" value change to [\"de\"]
Description
feat: add
--default_lang
/PAIR_DEFAULT_LANG
to set default languageTesting
test is included, but you can also test by: 1) start server 2) using websocket client of choice, connect to channelserver (e.g.
$ wsdump.py --headers "Accept-Language:-" ws://localhost:8000/v1/ws/
3) check output logs of server and seeinfo
debug statement:{"Logger":"channelserver-1.0.0",... "Fields":{"msg":"No location info for IP","lang":"[\"en\"]","remote_ip":"127.0.0.1"}}
if desired, you can start the server with
PAIR_DEFAULT_LANG="de"
and perform the same ws client call and see the "lang" value change to[\"de\"]
Issue(s)
83