Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将我的 android 项目转换为多种语言。我创建了一个列表视图,其中将显示不同的语言。当我从此列表中选择任何项目时,我想更改设备语言。我怎样才能做到这一点?
您可以像这样更改语言
Locale locale = new Locale("en_US"); Locale.setDefault(locale); Configuration config = new Configuration(); config.locale = locale; context.getApplicationContext().getResources().updateConfiguration(config, null);