安卓:有没有办法改变了Android的默认语言为新的语言? [英] Android : Is there any way to change the default language of android to new language?

查看:127
本文介绍了安卓:有没有办法改变了Android的默认语言为新的语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以更改默认的Andr​​oid操作系统的语言等。对于所使用的语言是不是在比如设置:如何设置设备的语言缅甸编程

I'm trying to know whether it is possible to change the default android OS language to other. For which the language is not in the settings for instance: how to set the device 's language to burmese programmatically.

推荐答案

使用这种以编程方式来改变语言 -

Use this to change the language by programmatically--

Locale locale = new Locale("en_US");
Locale.setDefault(locale);
Configuration config = new Configuration();
config.locale = locale;
context.getApplicationContext().getResources().updateConfiguration(config, null);

编写语言的国家code代替任何一种语言,你想用en_US......像日本 - Ja_JP表示对于阿拉伯语 - AR或检查该链接,$ C $了C国家 -

Write the countrycode of language in place of "en_US" whatever language you want...like for japanese--"ja_JP" For Arabic--"ar" or check this link for code of country--

<一个href="http://$c$c.google.com/apis/igoogle/docs/i18n.html">http://$c$c.google.com/apis/igoogle/docs/i18n.html

,并在 RES /值-JA 日本或 RES /值-AR 文件夹为阿拉伯语。

And make a folder in res/values-ja for japanese or res/values-ar for arabic..

和做出的 string.xml文件,然后把任何你想要在你的版面语言。它会取默认语言的值,否则文件夹手动想它,然后它会读取来自外部文件夹值-AR等一样...

And make string.xml file And put the languages whatever you want on your layout.. It will fetch the default language from values folder otherwise you want it manually then it will fetch from your external folder values-ar etc. like...

RES /值-AR它例如阿拉伯语 -

<?xml version="1.0" encoding="UTF-8"?>
  <resources>
    <string name="spinner_label">تصفية حسب</string>
    <string name="app_name">2011 فرق</string> 
    <string name="search">بحث :</string>
</resource>

希望这会帮助你。

Hope It will help you..

这篇关于安卓:有没有办法改变了Android的默认语言为新的语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆