Handles previous and next navigation based on language