Added support for language switching and fixed page size error