adding code to pass locale codes to twigs