title: Android: Displaying Kannada Language In Phones With No "kn" Locale
body: <p>I have a samsung galaxy y duos and a Google Nexus 5 with me. I have my application running on both phones. I have to provide this app in two languages (Kannada &amp; English). I choose the language by switching the locale (By convention).</p>
  
  <p>Nexus 5 has the locale "kn" in its locale list and Y Duos does not have "kn" in it. But when I try to use String.xml inside values-kn folder, the Kannada texts are being rendered properly in Y Duos even though it has no "kn" locale in it.</p>
  
  <p>I have a piece of code which looks for "kn" locale and enable/disable Kannada language feature. It is given below.</p>
  
  <pre><code>public boolean isLocalePresent(Locale newLocale) {
      Locale[] locales = Locale.getAvailableLocales();
      for (Locale locale : locales) {
          if (locale.getLanguage().equals(newLocale.getLanguage()) {
              return true;
          }
      }
      return false;
  }
  </code></pre>
  
  <p>I call it as follows;</p>
  
  <pre><code>if (isLocalePresent(new Locale("kn"))) {
      // change default locale to "kn"
  }
  </code></pre>
  
  <p>Could anyone please tell me how can I make my app use Kannada texts in all phones that can render Kannada text.? How can I know that whether the phone supports Kannada text rendering even if "kn" locale is absent in the Locale list.?</p>