Use core-like Site.code instead of Site.lang

- the site code not the language code is needed here
- bugfix for site.language which is a function, not a string

Change-Id: Id8df6cf8209cd4f69b62a2b67524ae3d0aaf84c9
Merge "Use core-like Site.code instead of Site.lang"