Reputation: 127
I tried to build an android application, when I use non-english langues like persian as name of application it causes this error AndroidManifest.xml file missing
and no manifest builds but when I use english it works successful, why?
Upvotes: 0
Views: 740
Reputation: 869
Farsi IS included in UTF8. You need to add a string in strings.xml in /res/values. Then define a farsi name there. Your string.xml will look like this:
<string name="app_name">اسم اپ</string>
<string name="title_tab1">تماس با ما</string>
<string name="action_settings">Settings</string>
And you will reference it in you manifest.xml like this:
android:label="@string/app_name"
But remember: Farsi characters are not perfectly shown in android 2.2 and 2.3. The characters are displayed separately. For later androids this is not an issue.
Upvotes: 0
Reputation: 39836
at the top of every XML file in Android you'll see
<?xml version="1.0" encoding="utf-8"?>
So first I ask you: is persian included in utf-8
encoding?
I had a quick look on this link http://www.utf8-chartable.de/ and it seems to be me that's a no
but I'm no language expert and that table might show persian as one of it related or base languages (like portuguese uses latin set)
If persian is not available in the utf-8
your best option to try to get this name in the app name is to create a strings_per.xml (inside the /values/ folder) and in there you put a different encoding and the string you need for the app name.
note that I tried to isolate the problematic variable in its own file because I'm not sure it would be a good idea to mix it with the rest of the manifest.
Upvotes: 1