Better method of replacing locale and title in host page