title: How to convert english "abc123 " digits to arabic "ابث١٢٣ " dynamically android
body: <p><strong>UPDATED</strong></p>
  
  <p>i have been looking for solution but couldnt found it yet ..</p>
  
  <p>i have tried this </p>
  
  <pre><code>// Check for language
      String tempLang = Locale.getDefault().getLanguage();
      if (tempLang == "ar") {
          Locale AR_LOCALE_EAST_NUMBERS = new Locale.Builder().setLanguageTag("ar-u-nu-arab").build();
          Locale.setDefault(AR_LOCALE_EAST_NUMBERS);
  
          firstName.setKeyListener(DigitsKeyListener.getInstance(getActivity().getString(R.string.input_charatars_only_valid)));
      } else {
  
          firstName.setKeyListener(DigitsKeyListener.getInstance(getActivity().getString(R.string.input_charatars_only_valid)));
      }
  </code></pre>
  
  <ol>
  <li><p>first of all it gives error of API .. it says to use </p>
  
  <p>@TargetApi(Build.VERSION_CODES.LOLLIPOP)</p></li>
  <li><p>i want to use it for 15 API as my minSdk is 15</p></li>
  </ol>
  
  <p>is it correct or any changes needed</p>
  
  <p><strong>UPDATED</strong> : </p>
  
  <p>kindly also tell how to convert the digits in english as</p>
  
  <p>"abcdefghijklmnopqrstuvwxyz123456789 " and a sapce also ""</p>
  
  <p>what would be done to convert the string to arabic with abc,123 &amp; a space ?</p>
  
  <p>PS : i am new here kindly ignore is any mistake is done ..
  thanks</p>