Android 7.0以降、多言語ユーザー向けのAndroid言語とロケールサポートが改善されました。Android 7.0以上のマルチリンガルサポートは機能しません
https://developer.android.com/guide/topics/resources/multilingual-support.html
しかし、それは私が考えたものを正確に動作しません。ここ
ここRES /レイアウト/ activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.tistory.httphckim999.languageprioritytest.MainActivity"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/first_test" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/second_test" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/third_test" />
</LinearLayout>
はここRES /値/のstrings.xml
<resources>
<string name="app_name">Language Priority Test</string>
<string name="first_test">first default</string>
<string name="second_test">second default</string>
<string name="third_test">third default</string>
</resources>
であるRES /値-KO /のstrings.xml
<resources>
<string name="first_test">first ko</string>
</resources>
ここにはres/values-zh/strings.xmlがあります。
<resources>
<string name="second_test">second zh</string>
</resources>
そしてここでは、RES /値-JA/
<resources>
<string name="third_test">third ja</string>
</resources>
そして、私のテストデバイスが優先されるロケール設定のstrings.xmlである "KO> ZH> JA" 私はそれがこのように印刷されるべきだと思う
。
最初KO
第ZH
第JA
しかし、この
最初KO
ように印刷しました秒デフォルト
第三デフォルト
それは次のように印刷された理由を私は理解できません。
テストプロジェクトをここにアップロードします。
https://github.com/kimhc999/LanguagePriorityTest
IギャラクシーS7(7.0)、PIXEL(8.0プレビュー3)、及びエミュレータ(7.0、7.1、8.0)でそれを試験しました。しかし、それらのすべてが同じ結果を持っています。
誰でも手伝ってもらえますか?
ありがとうございます。
3言語は表示されません。あなたのデバイスはコです、そしてあなたはアプリにコウ –
@ヤンビンを示しています彼らはマルチ言語設定のAndroid 7.0をサポートし、私は "ko> zh> ja"を設定します。しかし、1つの言語のみを表示しますか? –