Change locale (language) of your device via ADB (on Android OS version 8.0, 7.0, 6.0, 5.0, 4.4, 4.3, 4.2 and older).
No need to root your device! With ADB (Android Debug Bridge) on your computer, you can fast switch the device locale to see how your application UI looks on different languages.
Usage:
- install this app
- setup adb connection to your device (http://developer.android.com/tools/help/adb.html)
- Android OS 4.2 onwards (tip: you can copy the command here and paste it to your command console):
adb shell pm grant net.sanapeli.adbchangelanguage android.permission.CHANGE_CONFIGURATION- Language change example 1, Brazilian Portuguese:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language pt-rBR- Language change example 2, French and English:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language fr,enThis tool is especially handy for developers who want to add locale switching to (test) automation. Tool works on all the latest public OS versions, verified on Android OS 8.0 (Oreo, Google Pixel XL) 7.0 (Nougat, LG G5), 6.0 (Marshmallow, Nexus 6 and Nexus 9), 5.0 (Lollipop, Nexus 5), 4.4 (Kitkat, Galaxy S5), 4.3, 4.2, 4.1 (Jelly Bean), 4.0 (Ice Cream Sandwich, Asus Transformer tablet).
Some of the common languages for quick reference (copy-paste):
Arabic:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language arChinese (Simplified):
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language zh-rCNChinese (Traditional):
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language zh-rTWDanish:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language daDutch:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language duEnglish:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language enFinnish:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language fiFrench:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language frGerman:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language deGreek:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language elHebrew:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language iwItalian:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language itJapanese:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language jaKorean:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language koNorwegian:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language noPolish:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language poPortuguese:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language ptPortuguese (Brazilian):
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language pt-rBRRussian:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language ruSpanish:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language esSwedish:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language seThai:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language thTurkish:
adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language trFor a complete list of language codes, see http://stackoverflow.com/a/30028371/1097104.
Дабавлено :
2021-02-23 17:03:06