title: Translating iOS app to unsupported/non-standard languages
body: <p>I am expanding an existing iPhone app (4.x and up) with support for more languages: Estonian, Latvian and Lithuanian.</p>
  <p>In my iPhone and in the simulator there is no support for these languages, and I am pretty sure that no special firmware exists for them either for use in those territories.</p>
  <p><strong>How can I best make an app that supports them?</strong></p>
  <p>I have come up with two solutions which I don't really like. Neither of them allows me to have more than one language in the app, since the user cannot choose the bundled languages from the Settings.app list. This means that one version must be submitted for each language.</p>
  <h2>Option 1: Abuse the en.lproj directory</h2>
  <p>For each targeted language (lt, lv, et) I put the strings files for that language into an en.lproj directory.</p>
  <p><strong>Pros:</strong> Uses a well-known mechanism. The app just thinks it is running English.</p>
  <p><strong>Cons:</strong> Wreaks havoc on my localization tools. Its confusing for future maintainers and therefore error prone. Requires a weird build setup.</p>
  <h2>Option 2: Abuse NSUserDefaults[AppleLanguages]</h2>
  <p>The <code>AppleLanguages</code> object in NSUserDefaults contains a list of languages for the app to use. By setting it like this I can get the app to load for example Lithuanian from an lt.lproj directory:</p>
  <pre><code>[[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:@&quot;lt&quot;, nil] forKey:@&quot;AppleLanguages&quot;];
  </code></pre>
  <p>(For historical reasons I am already doing a slightly more involved version of this to remove a deprecated translation in some versions of the app. Otherwise older installations would pick up the lproj dir even though I no longer bundle it with the app.)</p>
  <p><strong>Pros:</strong> Uses properly named lproj directories. Integrates well with localization tools. Simple setup. Only requires one line in <code>main.m</code> to implement.</p>
  <p><strong>Cons:</strong> Even though the <code>AppleLanguages</code> key is being used by a lot of people this solution uses it to load otherwise unsupported languages, so I fear I might be skating on thin ice.</p>
  <h2>Le Questions</h2>
  <ul>
  <li>How do other apps normally support these &quot;unsupported&quot; languages?</li>
  <li>Is there a way to support them along with the normally supported languages?</li>
  <li>How do you feel about the <code>AppleLanguages</code> hack?</li>
  </ul>