add locale detection and change locale when locale url params is provided