Search code examples
ionic-frameworklocalizationpseudolocalization

Ionic: Why the detected device language is 'zz-ZZ'


In ionic navigator.language returns en-US on the browser and zz-ZZ on my Android device.

I've read that it is called Pseudolocalization.

Why does it happen? How can I get the real device language?


Solution

  • You should inject the $locale service and retrieve the device language using $locale.id