map $http_accept_language $header_lang {
	default '';
	~*^en-US '';
	~*^en '';
	~*^ar ar;
	~*^cs cs;
	~*^da da;
	~*^de de;
	~*^es es;
	~*^fa fa;
	~*^fr fr;
	~*^ko ko;
	~*^hi hi;
	~*^it it;
	~*^he he;
	~*^ka ka;
	~*^hu hu;
	~*^mk mk;
	~*^nl nl;
	~*^ja ja;
	~*^nb nb;
	~*^pl pl;
	~*^pt pt;
	~*^ro ro;
	~*^ru ru;
	~*^sl sl;
	~*^fi fi;
	~*^sv sv;
	~*^th th;
	~*^tr tr;
	~*^uk uk;
	~*^vi vi;
	~*^zh zh;
	~*^lt lt;
}
map $cookie_lang $lang {
	default $header_lang;
	~*^en-US '';
	~*^en '';
	~*^ar ar;
	~*^cs cs;
	~*^da da;
	~*^de de;
	~*^es es;
	~*^fa fa;
	~*^fr fr;
	~*^ko ko;
	~*^hi hi;
	~*^it it;
	~*^he he;
	~*^ka ka;
	~*^hu hu;
	~*^mk mk;
	~*^nl nl;
	~*^ja ja;
	~*^nb nb;
	~*^pl pl;
	~*^pt pt;
	~*^ro ro;
	~*^ru ru;
	~*^sl sl;
	~*^fi fi;
	~*^sv sv;
	~*^th th;
	~*^tr tr;
	~*^uk uk;
	~*^vi vi;
	~*^zh zh;
	~*^lt lt;
}
