1

I am new to android studio. I am trying to create an application with localisation(Tamil). When I paste my Tamil language into android editor the font is not appearing as it should. Here is the Screen shot of my android studio

Already surfed lot here. There is no answer for this issue. It would be great if anyone help on this.

mohan m
  • 67
  • 6
  • Check this: https://stackoverflow.com/questions/10943811/how-to-set-custom-locale-for-indian-regional-languages-in-android-emulator – Ajay K S Jan 16 '20 at 04:33
  • What is the error when you hover `name="app"` in Android Studio? – StefanTo Jan 16 '20 at 04:35
  • @StefanTo that error is actually main strings file don't have exact translatable word. That wont be the issue.. Thanks! – mohan m Jan 16 '20 at 04:55
  • Did your problem solved? – Prajwal Waingankar Jan 16 '20 at 05:31
  • Does this answer your question? [how to set custom locale for indian regional languages in android emulator](https://stackoverflow.com/questions/10943811/how-to-set-custom-locale-for-indian-regional-languages-in-android-emulator) – Md. Yamin Mollah Jan 16 '20 at 06:41
  • @Md.Yamin - Even while paste the tamil words in android studio(strings.xml file) also the font looks different. like i mentioned in the attached image [https://i.stack.imgur.com/bdgFk.png] – mohan m Jan 16 '20 at 07:02
  • @PrajwalW - No still the same. – mohan m Jan 16 '20 at 07:03
  • Are the characters shown correctly when you paste them somewhere else in your Mac? Or only in Android Studio? – StefanTo Jan 16 '20 at 12:57

3 Answers3

0

When i tried to generate that same condition I came to know that you haven't added that string named "app" in your default locale i.e. in strings.xml and you are directly trying to add a translation for it.

When u hover to that error it states:

app is transalted here but not found in default locale.

First add(create) that string in your strings.xml file and then try to add it in your strings.xml (tamil) file.

Prajwal Waingankar
  • 2,534
  • 2
  • 13
  • 20
  • Actually i m trying to paste the tamil strings into my android studio's (values-ta/strings.xml) **ஆங்கில தட்டச்சு வழியாக நம் மொழி** this is the actual tamil string i want to paste in to my android studio, i tried another Macbook pro its showing correctly, but in my Macbook its showing differently like this [https://i.imgur.com/qTwBFfV.png] – mohan m Jan 16 '20 at 08:11
  • yes u r correct what i am saying is first add a english translation for it in your values/strings.xml file . – Prajwal Waingankar Jan 16 '20 at 08:13
  • Its already added. please kindly understand my issue, for me the main issue is i m not able to paste the Tamil words in to my android studio which i mentioned above. – mohan m Jan 16 '20 at 08:17
  • pls edit your code to show the strings.xml default file where u hv added that already! – Prajwal Waingankar Jan 16 '20 at 08:18
  • Here is the default strings.xml file. Please Ref the screenshot [https://i.imgur.com/kGpDeFm.png] – mohan m Jan 16 '20 at 08:22
  • I m not getting any error, just i want to add Tamil words into a string. when i paste Tamil words its shows differently. – mohan m Jan 16 '20 at 09:28
  • in your ss provided in your question....it shows in red color underlined for your text. Just hover over that string to know the error msg – Prajwal Waingankar Jan 16 '20 at 09:34
  • can you see the updated ss Default: [https://i.imgur.com/kGpDeFm.png] Tamil: [https://i.imgur.com/UsXDHFT.png] – mohan m Jan 16 '20 at 09:51
  • you mentioned error already gone. My concern is, you can see the difference in the tamil wording. This is what i am expecting to paste **ஆங்கில தட்டச்சு வழியாக நம் மொழி** . But what i am getting in the ss is different. – mohan m Jan 16 '20 at 09:56
  • u mean the tamil wordings is not correct?? to what u r trying to paste? – Prajwal Waingankar Jan 16 '20 at 10:41
  • My answer solved your problem for app error in underlined right??? after the solution of mine, the underline gone right???? – Prajwal Waingankar Jan 16 '20 at 10:42
0

Follow these steps:

  1. First go to your project's res folder --> then open values folder --> then open "strings.xml" file and remove all text inside it and paste the text shown below:

    <resources>
        <string name="app_name">My Application</string>
        <string name="tamil_app_name">ஆங்கில தட்டச்சு வழியாக நம் மொழி</string>
    </resources> 
    
Md. Yamin Mollah
  • 1,609
  • 13
  • 26
  • Thanks for your reply - After pasting your code in my android studio the Tamil words dint looks correct, the words looks different. Here is my screenshot [https://i.imgur.com/MGMc18A.png] – mohan m Jan 17 '20 at 02:06
0

Because you have to create a Tamil language string file to set your language. please do the following steps-: 1) Firstly declare all the strings in main strings.xml 2) Then create the string file according to your language choice, Example strings.xml(ta) 3) (ta) is the language code accordingly. 4) The Strings that you have in your main string file convert them into particular language which you want then paste it into the new created String file.

Apps Maven
  • 1,314
  • 1
  • 4
  • 17