cubiq/add-to-homescreen — pull request #94 by RogerE (2014-05-27 17:23:26+00:00)
Title: Fix android language detection

While working on translations I discovered an issue with language detection on android. For example on a device with Norwegian language selected:

iOS: navigator.language is 'nb-no' which is normalized to nb_no
Android: navigator.language is 'nb' which is normalized to nb_nb

This pull request suggests an alternative solution where available languages are searched for matching starting letters and the first match is used. You can probably implement this more elegantly yourself, but at least it should work as a proof of concept.