How to programmatically get the localization value of the android device, i.e. Which language in the system settings, for example, ru, en or ge?
An object of type Locale with all the info about the language can be obtained as follows:
Locale
Locale.getDefault(); //вернёт что-то типа ru_RU
The language code in 2 letters can be obtained as follows:
Locale.getDefault().getLanguage(); //вернёт что-то типа ru
Source: https://ru.stackoverflow.com/questions/628910/More articles:Same data when copied in list in Vue.jsHelp to understand the work of the recursive algorithm in C ++Coordinates of the mouse near the pointer (arrows) in JavaHow to change the frame color of the pressed buttonPseudo-class: root and work with itReplacing fragment by fragmentI do not understand how to arrange foreign keys. Entity FrameworkMarkup html5 product catalog pageAre there any restrictions for HTML inside email?How to parse links using jsoup from a site?All Articles