title: Compare strings independently of current language
body: <p>i'm having a hard time trying to understand how to deal with language - and trying to explain myself in english.</p>
  
  <p>For example, take a look at this</p>
  
  <pre><code>&lt;resources&gt;
  &lt;string name="temperature_celsius"&gt;Celsius&lt;/string&gt;
  &lt;string name="temperature_fahrenheit"&gt;Fahrenheit&lt;/string&gt;
  &lt;string name="temperature_kelvin"&gt;Kelvin&lt;/string&gt;
  
  &lt;string-array name="temperature"&gt;
      &lt;item&gt;@string/temperature_celsius&lt;/item&gt;
      &lt;item&gt;@string/temperature_fahrenheit&lt;/item&gt;
      &lt;item&gt;@string/temperature_kelvin&lt;/item&gt;
  &lt;/string-array&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>Now, imagine that i have another xml file where Celsius, Fahrenheit and Kelvin are written differently in another language. </p>
  
  <pre><code>//name of temperature units in another galaxy
  &lt;resources&gt;
  &lt;string name="temperature_celsius"&gt;Celsioso&lt;/string&gt;
  &lt;string name="temperature_fahrenheit"&gt;Fahrenheitzkeum&lt;/string&gt;
  &lt;string name="temperature_kelvin"&gt;Kalvon&lt;/string&gt;
  
  &lt;string-array name="temperature"&gt;
      &lt;item&gt;@string/temperature_celsius&lt;/item&gt;
      &lt;item&gt;@string/temperature_fahrenheit&lt;/item&gt;
      &lt;item&gt;@string/temperature_kelvin&lt;/item&gt;
  &lt;/string-array&gt;
  </code></pre>
  
  <p>Now, i want my alien user to see the units in its own language, so i need to compare them taken that into account. Is there an efficient way in which i could do this instead of hardcoding the value of each string item? I tried using a switch but it says <strong>constant expression required</strong>, i think it works if i use if-else, but it looks ugly:</p>
  
  <pre><code>//convert from celsius(baseUnit) to something else(endUnit) 
  //baseUnit and endUnit are strings taken from two autocompletetextviews
  if(baseUnit.equals(mContext.getResources().getString(R.string.temperature_celsius))) {
          convertFromCelsius(endUnit, inputValue, mContext);
  </code></pre>
  
  <p>I'm handling the UI in my main activity, the job of converting each unit is done in other java classes (that's why i'm using a mContext). </p>
  
  <p>Thanks, and sorry for my bad english.</p>