check locale before passing it back to render call