在仍然使用Android资源的情况下,是否可以通过编程方式更改应用程序的语言?
如果没有,是否可以以特定语言请求资源?
我想让用户改变应用程序的语言从应用程序。
如何通过编程方式改变Android语言
我的代码:
Configuration config ; // variable declaration in globally // this part is given inside onCreate Method starting and before setContentView() public void onCreate(Bundle icic) { super.onCreate(icic); config = new Configuration(getResources().getConfiguration()); config.locale = Locale.GERMAN ; getResources().updateConfiguration(config,getResources().getDisplayMetrics()); setContentView(R.layout.newdesign); }