在android studio string.xml中用HINDI编写

时间:2016-01-31 10:47:42

标签: android xml

我正在尝试使用android studio在android上学习/构建我的前几个应用程序。除了默认语言,我想添加对HINDI语言的支持。我已经创建了hindi所需的strings.xml文件,并且我已经验证在Android设备上选择HINDI语言时,我在此文件中放置的任何字符串都会正确显示。为了试试这个,我只是用英文字符写了不同的东西,因为我无法弄清楚如何用android studio中的HINDI编写。

例如。我希望在我的hindi strings.xml

中有这样的东西
<string name="customer_name">क्रुपया अपना नाम लिखे</string>

目前我只在XML中使用它:

<string name="customer_name">Please enter your name</string>

有人可以提供我应该怎么做才能直接在android studio xml中输入hindi语言?

3 个答案:

答案 0 :(得分:0)

您可以使用http://www.quillpad.in/editor.html之类的在线印地语编辑器,然后将单词复制并粘贴到android studio翻译窗口中。

答案 1 :(得分:0)

不确定是否已回答此问题,但是我通过使用印地语键盘在Microsoft Word中键入单词/短语来做到这一点,然后将文本复制粘贴到Android Studio翻译编辑器中。

答案 2 :(得分:-2)

这对我有用。

 <TextView
    android:id="@+id/title_hindi"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="भारतीय सूचना प्रौद्योगिकी संस्थान, मणिपुर"
    android:textStyle="bold"
    android:textColor="#1a237e"
    android:textAppearance="?android:textAppearanceLarge"
    android:background="#fdd835"
    android:padding="10dp"
    />