如何在我的应用程序中更改语言时更改“键盘语言文本输入”

时间:2012-10-25 04:35:26

标签: android configuration localization resources

我想创建一个应用程序,并在我的应用程序中支持多种语言。但是当我改变语言时,我无法改变键盘语言。 以下是我的应用程序中更改语言的代码...

  

String [] lCode = getResources().getStringArray(R.array.language_code);
  Locale locale = new Locale(lCode[position]);
  Locale.setDefault(locale);
  Configuration config = new Configuration();
  config.locale = locale;
  getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics());

这里的language_code值为xml ...

  

en-us zh_TW fr de ru es

0 个答案:

没有答案