I've got a problem where
siteURL wasn't working for a localized version of my site. I have a site in two languages — Russian and English, with Russian exposed under
www.mysite.com and English under
My problem was that
siteUrl variable was always giving me a non localized version of the site URL (
www.mysite.com instead of
www.mysite.com/en/) on the pages in English, even though other localized features were working fine (strings were translated into English, correct entries output etc.). See below for the solution.