【发布时间】:2013-05-23 06:44:43
【问题描述】:
我想将我的 android 项目转换为多种语言。我创建了一个列表视图,其中将显示不同的语言。当我从此列表中选择任何项目时,我想更改设备语言。我该怎么做?
【问题讨论】:
-
查看此链接。提问前请先搜索。 stackoverflow.com/questions/7657106/…
我想将我的 android 项目转换为多种语言。我创建了一个列表视图,其中将显示不同的语言。当我从此列表中选择任何项目时,我想更改设备语言。我该怎么做?
【问题讨论】:
您可以像这样更改语言
Locale locale = new Locale("en_US");
Locale.setDefault(locale);
Configuration config = new Configuration();
config.locale = locale;
context.getApplicationContext().getResources().updateConfiguration(config, null);
【讨论】: