6
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【android】端末の設定言語を取得する方法

Posted at
Locale locale = Locale.getDefault();
ーーーーーーー
出力例:Log.d("log",String.valueOf(locale));
英語:en
日本語:ja
韓国語:ko
中国語:zh
Locale locale = Locale.getDefault();
String language = locale.getLanguage();
ーーーーーーー
出力例:Log.d("log",language);
英語:多数(usとか)
日本語:JP
韓国語:KO
中国語:多数(twとか)
Locale locale = Locale.ENGLISH.getLanguage();
※ENGLISH/JAPAN/KOREA/CHINA
String language = locale.getLanguage();
ーーーーーーー
出力例:Log.d("log",language);
英語:en
日本語:ja
韓国語:ko
中国語:zh
6
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?