不同的语言在Android版的TextView [英] Different language on textview in Android
本文介绍了不同的语言在Android版的TextView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎么能写的TextView或EditText上不同的语言(孟加拉)的Android和为了这个,我有什么版本的API需要
how can i write different language (Bangla) on textview or edittext in Android and for this What version of API i have to need
推荐答案
如果您使用的strings.xml添加间接字符串值的水平,那么你可以很容易地本地化您的字符串为:
If you use strings.xml to add a level of indirection for string values, then you can easily localize your strings as in:
android:text="@string/main_text_view_hello"
所以我必须在文件夹中一个的strings.xml:
So I have a strings.xml in folders:
res/values
res/values-en-rCa
res/values-en-rGB
任何时候我想改变加拿大或英国的值,我只是将它添加到相应的文件夹。所有其它的值由RES /值默认获得的。
Any time I want to change a value for Canada or United Kingdom, I just add it to the appropriate folder. All other values are obtained by default from res/values.
这篇关于不同的语言在Android版的TextView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文