title: Change decimal seperator locale in Android string resource
body: <p>I want to display some coördinates in my Android app.
  I receive two double values (<code>lat</code> and <code>long</code> in decimal degrees notation) from my backend.</p>
  <p>Example data:</p>
  <pre><code>var lat : Double = 52.5027
  var long : Double = 5.41982
  </code></pre>
  <p>Now i fill my textView in my class file:</p>
  <pre><code>tvLat.text = getString(R.string.gps_format, lat)
  tvLong.text = getString(R.string.gps_format, lat)
  </code></pre>
  <p>and my xml resource file contains this:</p>
  <pre><code>&lt;string name=&quot;gps_format&quot;&gt;%,.5f&amp;#176;&lt;/string&gt;
  </code></pre>
  <p>It displays:</p>
  <pre><code>52,50270°
  5,41982°
  </code></pre>
  <p>As I live in the Netherlands it is formatted accordingly.</p>
  <p>See <a href="https://developer.android.com/reference/java/util/Formatter" rel="nofollow noreferrer">https://developer.android.com/reference/java/util/Formatter</a></p>
  <blockquote>
  <p><strong>Number Localization Algorithm</strong></p>
  <ol>
  <li>...</li>
  <li>If a decimal separator is present, a locale-specific decimal separator is substituted.</li>
  </ol>
  </blockquote>
  <p>We typically use a <code>,</code> as a <code>decimal separator</code>, and <code>.</code> as a <code>group separator</code> in  the Netherlands.</p>
  <p><strong>Question:</strong></p>
  <ul>
  <li>Is there an international standard for the notation of coördinates in decimal degrees which requires the decimal seperator to be <code>.</code>?</li>
  <li>If there is, or I just want to, how do I achieve this without changing my locale or formatting for the entire app?</li>
  </ul>
  <p>Desired output:</p>
  <pre><code>52.50270°
  5.41982°
  </code></pre>
  <p>I have not found a way yet for the XML, so my guess is that it will have to be done with code. I've looked into the <code>setDecimalSeparator</code> method, but I can't get any working solution.</p>