我有要求在我的安卓和索马里的语言支持安卓和IOS的申请,但我找不到任何文件有关的亚美尼亚和索马里languages.If任何人知道这一点,请帮助我。
提前道谢。
发布于 2014-04-02 17:51:03
please follow below link it may be use fullhttp://snowpard-android.blogspot.in/2013/03/programmatically-change-language-in.html
步骤1:为亚美尼亚语创建值文件夹(values-hy),例如:
<string name="app_name">Հղրդգրթ</string>
<string name="hello_world">Պարամետրեր</string>
步骤2:根据你的需求,你应该写下下面的代码
eg: mtextView1.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Locale locale = new Locale("hy");
Locale.setDefault(locale);
Configuration config = new Configuration();
config.locale = locale;
getBaseContext().getResources().updateConfiguration(config,
getBaseContext().getResources().getDisplayMetrics());
updateText();
}
});
public void updateText(){
mtextView1.setText(R.string.hello_world);
}https://stackoverflow.com/questions/22803013
复制相似问题