0

I need to create an activity for "Terms & Conditions" with support for different languages, but this is a long text document with several headers, paragraphs, points... which varies for each different language. So I think that having a strings.xml document for each language is not enough because each language "Terms & Conditions" has a different number of paragraphs, and specific layout for each language too. Please correct me if I'm wrong.

What will be the best approach for this requirement? Do I need to use a different fragment for each language(I don't like this option too much)?

Thanks in advance.

Dispose
  • 3
  • 1

1 Answers1

2

My best approach with that is to create multiple web pages one for each language to be supported by your app and create a condition or your Activity that will test what language is being used by the device then load the appropriate WebView you need for that certain language. Hope it helps.

Locale.getDefault().getDisplayLanguage();

This will return a String value the language used on the device.

For more info about getting the language refer to this link

Community
  • 1
  • 1
jofftiquez
  • 7,548
  • 10
  • 67
  • 121