code star
code star

Reputation: 31

How to set Default language other than english in Android?

I have a project by my client that has built successfully in his system but as he sent to me I am unable to compile it because of unicode characters (Latin characters) in default strings.xml under res. I believe its the default localizations file but its forcing me to convert it into English but not parsing Latin Characters into it. e.g.

<string name="old_questions">Questões e soluções dos anos anteriores</string>

Upvotes: 0

Views: 89

Answers (2)

Mahendra Tejaswi
Mahendra Tejaswi

Reputation: 129

Make sure your string file is in the default values folder.

You can check the android developers link for better understanding.

To help you better please post the exact error you get while compiling the code.

Upvotes: 0

AkkixDev
AkkixDev

Reputation: 450

Check that the XML is in UTF-8 and has

<?xml ... encoding="UTF-8"?> 

or defaulted

 <?xml ... ?>

I tried your text in my studio , well it is working fine. You could also update question with your error , that would help understand it better.

Another workaround for small texts would be to simply escape it.

<string name="Example">Example character \u0026</string>

go to this website : https://unicode-table.com/en/#control-character and this could help you .

Upvotes: 1

Related Questions