Change the simulator language

Hi guys,

I’m using an ios simulator for my testings and I want to change the language settings of the device for each scenarios (I have 4 scenarios in my feature file)
For each scenario I need to execute my test in a different device language than the one before (ie: scenario1, the language of the simulator should be eng, the next one fr…) because my application will have a different behaviour based on the language setting of the device that we are using for testing.
I found that I can set the simulator language in capabilities but this is gonna applicable for the whole test session (so for the 4 scenarios).
Is there a way to set the language of the device in a hook on cucumber that when it reaches a scenario with a specific tag, it will set the language of the device to this or that language OR reset the session of the appium server with new capabilities (with a different language settings than the one before)

Thanks!!!

iOS:

capabilities.setCapability(MobileCapabilityType.LANGUAGE, "DE");

thanks for your reply.
but the capabilities will be the same for all scenarios in this case I mean that the language will be DE from my 4 scenarios.
And I’m looking to find a way to set a language from every scenario.
I’m trying to create a hooks in cucumber to reset the appium session and for each time a different capabilities

each scenario is ONE test where you start driver and quit. What force you to use same driver settings with all tests?

and even in test you may: driver.quit() -> start driver again with needed capabilities.

In this case how can I define new capabilities for each test?
my capabilities is written in a appium.txt file

Use testNG or similar approach and start driver in beforeMethod.