[JAVA] [Android] How to get the setting language of the terminal

Locale locale = Locale.getDefault();
--------
Output example: Log.d("log",String.valueOf(locale));
English: en
Japanese: ja
Korean: ko
Chinese: zh
Locale locale = Locale.getDefault();
String language = locale.getLanguage();
--------
Output example: Log.d("log",language);
English: Many(us)
Japanese: JP
Korean: KO
Chinese: Many(tw or something)
Locale locale = Locale.ENGLISH.getLanguage();
※ENGLISH/JAPAN/KOREA/CHINA
String language = locale.getLanguage();
--------
Output example: Log.d("log",language);
English: en
Japanese: ja
Korean: ko
Chinese: zh

Recommended Posts

[Android] How to get the setting language of the terminal
How to get today's day of the week
[Java] How to get the authority of the folder
[Java] How to get the URL of the transition source
[Java] How to get the maximum value of HashMap
[Rails] How to get the contents of strong parameters
[Swift] How to get the document ID of Firebase
How to get the longest information from Twitter as of 12/12/2016
How to change the setting value of Springboot Hikari CP
[jsoup] How to get the full amount of a document
[Rails] How to get the URL of the transition source and redirect
[Swift5] How to get an array and the complement of arrays
How to determine the number of parallels
[Swift UI] How to get the startup status of the application [iOS]
[Java] How to get the current directory
How to sort the List of SelectItem
How to get the date in java
How to get the length of an audio file in java
How to get coverage of Android Instrumented Tests [Do your best]
[Java] How to get to the front of a specific string using the String class
How to get the setting value (property value) from the database in Spring Framework
How to get the absolute path of a directory running in Java
Android development, how to check null in the value of JSON object
How to find the cause of the Ruby error
Customize how to divide the contents of Recyclerview
Output of how to use the slice method
How to display the result of form input
[Java] How to get the redirected final URL
How to check Rails commands in the terminal
[Swift] How to get the number of elements in an array (super basic)
graphql-ruby: How to get the name of query or mutation in controller Note
How to get the ID of a user authenticated with Firebase in Swift
[Java] How to easily get the longest character string of ArrayList using stream
How to delete / update the list field of OneToMany
[Ruby] How to find the sum of each digit
How to install the root certificate of Centos7 (Cybertrust)
[Android Studio] [Java] How to fix the screen vertically
[Rails] How to change the column name of the table
[SwiftUI] How to specify the abbreviated position of Text
As of April 2018 How to get Java 8 on Mac
How to prevent editTextPreference of android PreferenceFragmentCompat from breaking
How to judge the click of any area of the image
How to download the old version of Apache Tomcat
[Ruby] How to get the tens place and the ones place
How to use UsageStatsManager in Android Studio (How to check the startup time of other apps)
How to get the class name of the argument of LoggerFactory.getLogger when using SLF4J in Java
A memorandum because I was addicted to the setting of the Android project of IntelliJ IDEA
How to get the class name / method name running in Java
How to take a screenshot with the Android Studio emulator
An unsupported Java version How to get rid of errors
How to display the select field of time_select every 30 minutes
Get to the abbreviations from 5 examples of iterating Java lists
[IOS] How to get the table name from AWS DynamoDB
How to get values in real time with TextWatcher (Android)
[Ruby] How to retrieve the contents of a double hash
How to add elements without specifying the length of the array
Let's summarize how to extend the expiration date of Rails
How to solve the problems of Java's three Blocking Queues
[Rails] How to display the list of posts by category
How to mock some methods of the class under test
How to implement one-line display of TextView in Android development