added validate method for layouts
changed order parameter of the language field