title: How to check for a device language in android?
body: <p>I want my application to check which language the phone is using. This if statement is supposed to do that:</p>
  
  <pre><code> if (Locale.getDefault().getLanguage().equals("en")) {
       yourYesResponse = "That is great " + usersName + "!";
   }
   else if (Locale.getDefault().getLanguage().equals("fr")) {
       yourYesResponse = "C\'est bon " + usersName + "!";
   }
  </code></pre>
  
  <p>But even if my device is set to French it still displays the English. Is there anything wrong with this if statement and if yes, then what?</p>
  
  <p>EDIT: Thanks for the help. I appreciate it.</p>