Create task to switch system language (locale) of your Android device between two languages of your choice.
Works on Android 7 and above.
Enable Developer Options in your device. How to do it - here.
STEP 1 - PREPARE LANGUAGE PREFERENCES LIST
- Open Android Settings.
- Scroll down the list of available settings until you find Languages & Input, below which you can see the active display language used by the Android operating system.
- Tap on the first option in this screen: Languages.
- Add the second language that you want to use - tap “+ Add a language”. Scroll down the list until you find the language that you are looking for and then tap on its name. As you can see on Language preferences list I left two languages I want to switch between.
- Exit Languages & Input.
STEP 2 - GET SWIPE COORDINATES FOR AUTOINPUT
Your coordinates may be different than I got. Try to get you coordinates.
- Open Developer options and enable Pointer location option.
- Open Language preferences.
- Touch the "=" sign for the second language on the list and read X and Y coordinates on the top of the screen. Note them down.
- Touch the "=" sign for the first language on the list and read X and Y coordinates on the top of the screen. Note them down.
- Open Developer options and disable Pointer location option.
- Exit Settings.
STEP 3 - CREATE LOCALE SWITCH TASK
The task will switch locale only with two first languages on the Language preferences list.
- Open Tasker and add new task, name it Locale Switch.
- Add Settings Locale Settings action.
- Add Flash action: Switching locale...
- Add Wait action: 2 sek.
- Add AutoInput Gestures action. Tap Gesture Type and choose Swipe.
- In Start Point input fields enter coordinates for the second language.
- In End Point input field enter coordinates for the first language.
- In Duration enter value 700. This value gives you drag input.
- Go back to task and add Wait action: 1 sek.
- Add AutoInput Global Action Home .
- Add Wait action: 15 sek. Give Android some time to apply changes in the case you switch locale again and again within the short time (e.g. when testing the task). It prevents the system from crashing.
- Task Properties Collision Handling should be kept: Abort New Task.
- Exit to tasks list to save the task.
STEP 4 - TEST LOCALE SWITCH TASK
Created task is using Language preferences list behavior - when a language is moved to the top of this list, Android immediately starts using it.
- Create shortcut to the task on the screen. Run the task to switch locale