2

I've been trying to make a string as:

<string name="fatiha"></string>

and I've been trying to keep these texts inside this string:

سُوۡرَةُ الفَاتِحَة

সূরা ফাতিহা

بِسۡمِ اللهِ الرَّحۡمٰنِ الرَّحِيۡمِ

শুরু করছি আল্লাহর নামে যিনি পরম করুণাময়, অতি দয়ালু

  1. اَلۡحَمۡدُ لِلّٰهِ رَبِّ الۡعٰلَمِيۡنَۙ

যাবতীয় প্রশংসা আল্লাহ তা' আলার যিনি সকল সৃষ্টি জগতের পালনকর্তা

  1. ‏ الرَّحۡمٰنِ الرَّحِيۡمِۙ‏

যিনি নিতান্ত মেহেরবান ও দয়ালু

  1. مٰلِكِ يَوۡمِ الدِّيۡنِؕ‏

যিনি বিচার দিনের মালিক

  1. اِيَّاكَ نَعۡبُدُ وَاِيَّاكَ نَسۡتَعِيۡنُؕ‏

আমরা একমাত্র তোমারই ইবাদত করি এবং শুধুমাত্র তোমারই সাহায্য প্রার্থনা করি

  1. اِهۡدِنَا الصِّرَاطَ الۡمُسۡتَقِيۡمَۙ‏

আমাদেরকে সরল পথ দেখাও

  1. صِرَاطَ الَّذِيۡنَ اَنۡعَمۡتَ عَلَيۡهِمۡ ۙ‏

সে সমস্ত লোকের পথ, যাদেরকে তুমি নেয়ামত দান করেছ

  1. غَيۡرِ الۡمَغۡضُوۡبِ عَلَيۡهِمۡ وَلَا الضَّآلِّيۡنَ‏

তাদের পথ নয়, যাদের প্রতি তোমার গজব নাযিল হয়েছে এবং যারা পথভ্রষ্ট হয়েছে।

So, I've made the string like this:

<string name="fatiha">سُوۡرَةُ الفَاتِحَة\nসূরা ফাতিহা\nبِسۡمِ اللهِ الرَّحۡمٰنِ الرَّحِيۡمِ\nশুরু করছি আল্লাহর নামে যিনি পরম করুণাময়, অতি দয়ালু\nاَلۡحَمۡدُ لِلّٰهِ رَبِّ الۡعٰلَمِيۡنَۙ\nযাবতীয় প্রশংসা আল্লাহ তা' আলার যিনি সকল সৃষ্টি জগতের পালনকর্তা\n2. ‏ الرَّحۡمٰنِ الرَّحِيۡمِۙ‏ \nযিনি নিতান্ত মেহেরবান ও দয়ালু\n3.  مٰلِكِ يَوۡمِ الدِّيۡنِؕ‏\nযিনি বিচার দিনের মালিক\n4.   اِيَّاكَ نَعۡبُدُ وَاِيَّاكَ نَسۡتَعِيۡنُؕ‏\nআমরা একমাত্র তোমারই ইবাদত করি এবং শুধুমাত্র তোমারই সাহায্য প্রার্থনা করি\n5.  اِهۡدِنَا الصِّرَاطَ الۡمُسۡتَقِيۡمَۙ‏ \nআমাদেরকে সরল পথ দেখাও\n6. صِرَاطَ الَّذِيۡنَ اَنۡعَمۡتَ عَلَيۡهِمۡ ۙ‏ \nসে সমস্ত লোকের পথ, যাদেরকে তুমি নেয়ামত দান করেছ\n7. غَيۡرِ الۡمَغۡضُوۡبِ عَلَيۡهِمۡ وَلَا الضَّآلِّيۡنَ‏ \nতাদের পথ নয়, যাদের প্রতি তোমার গজব নাযিল হয়েছে এবং যারা পথভ্রষ্ট হয়েছে।</string>

But whenever I'm trying to run my app, its showing this error:

Error:(337) Apostrophe not preceded by \ (in ???????? ??????????
Error:(337) Apostrophe not preceded by \ (in ???????? ??????????

Whenever I click on any of these errors, it is taking me to the values.xml

any solution? Thanks in advance...

p32929
  • 99
  • 2
  • 11
  • check this answer http://stackoverflow.com/a/15705691/3790150 – saeed Dec 28 '16 at 13:30
  • [duplicate] @saeed answer will help you... ask question only if needed – Sri Kanth Dec 28 '16 at 13:40
  • The answer in the link is talking about the apostrophe in the string. but my string contains no apostrophes... – p32929 Dec 28 '16 at 14:10
  • try with this غَيۡرِ الۡمَغۡضُوۡبِ عَلَيۡهِمۡ وَلَا الضَّآلِّيۡنَ\nতাদের পথ নয়, যাদের প্রতি তোমার গজব নাযিল হয়ে and your put android:gravity="left" inside your textView – saeed Dec 28 '16 at 14:29

2 Answers2

0
    -

i think there is an apostrophe (') character in your string. replace it with (\') and it will fix the issue. for example

<string name="myText">hello and nice to meet you...I\'ll wellcome you</string>
HamidSayyah
  • 423
  • 3
  • 19
0

java

myTextView.setText(R.string.text1 + " " + R.string.text2);

In your String.xml:

<string name="text1">Your english text goes here/>
<string name="text2">Your arabic text goes here/>
Nandkishor mewara
  • 2,552
  • 16
  • 29
  • bro, the way you are showing, this way the string would be like: all Arabic lines together & all Bengali lines together. But I want a part of Arabic & then the Bengali meaning, again some Arabic part & the Bengali meaning & so on... – p32929 Dec 29 '16 at 15:34