1

I need to display language selection Activity where I want to display List of supported Languages.

I want to display List of languages in the specific language either, English in English, French in French and Japanese in Japanese in one ListView.

I know how we can create multy language Application, using different strings.xml files.
But don't have any idea, on how to display ListView in multiple languages.

Thanks.

User7723337
  • 11,857
  • 27
  • 101
  • 182

2 Answers2

1

You can define all the listview strings in String.xml file Like

<string-array name="language_list">
<item>English</item>
<item>Française</item>
<item>日本語</item>
<item>Deutsch</item>
<item>Español</item>
<item>Português</item>
<item>Italiano</item>
<item>简体中国</item>
</string-array>

and then populate the array in your java file. using adapter display list for this array.

1

It's not that Android restricts you to use a specific language for a specific locale. You can define a language list in values/strings.xml, fill the ListView and change application locale accordingly (see this question: Changing Locale within the app itself).

Community
  • 1
  • 1
Ash
  • 1,701
  • 13
  • 18