title: Checking user choice independently of locale in android
body: <p>I am checking a user input (specifically, a spinner choice) that is populated using a string-array in strings.xml. Afterwards I want to check that user input, however I want to avoid locale problems (the app is in two languages).</p>
  
  <p>I am currently iterating through the string-array like this:</p>
  
  <pre><code>String[] categories =  getResources().getStringArray(R.array.categories_array);
  for (String cat : categories) {
      if (cat.equals(category.getSelectedItem().toString())) {
          // Do stuff using the "name" attribute
      }
  }
  </code></pre>
  
  <p>Is there any way to retrieve the "name" attribute, maybe using the index of the string-array?</p>