androidlocalizationlocalesetlocale

How to get application language and device language separately in android?


My device language is in English and my application language is in Italian.So how I get the device language and application language programmatically ?


Solution

  • Get system language

    Resources.getSystem().getConfiguration().locale.getLanguage();
    

    Get app language

    String currentLang = Locale.getDefault().getLanguage();