wrong $this-context in lang detection

Using $this within that functions causes an error if no language is given and kirby should determine one. Use $site instead.