简体   繁体   中英

How to translate string-array using the Android Studio Translations Editor

In my strings.xml I have several string-arrays. I would like to translate them in the same way as I have translated other strings - using the Translations Editor in Android Studio. However, I cannot see the string-arrays in the Translations Editor. Is there any way how can I use the Translations Editor for the string-array as well as for strings? What is the best practise for translating string-arrays?

Let the array to use the string in strings.xml like following:

In arrays.xml:

<string-array name="countries">
    <item>@string/contry_option_0</item>
    <item>@string/contry_option_1</item>
</string-array>

In strings.xml:

<string name="country_option_0">Japan</string>
<string name="country_option_1">Thailand</string>

After doing that, you can see the key contry_option_0 and contry_option_1 in Translations Editor.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM