changed to read locale cookie directly