0

In My Application I have two product flavours, flavour1 and flavour2.

I also have language Files for 4 Languages: German, English, French and Spanish

My problem is:

  • In flavour1 the default language is German
  • In flavour2 the default language is English

My current solution is: I put the German strings.xml in

flavour1/res/values/strings.xml
flavour2/res/values-de/strings.xml

And the English files in

flavour1/res/values-en/strings.xml
flavour2/res/values/strings.xml

So I have both files twice in my project.

how can I solve this so that I have each file only once in the project?

user3292244
  • 453
  • 1
  • 4
  • 8

1 Answers1

0

Just change the default language during "onCreate" you do not need to have a flavour for that please check this post to understand how to do that

Community
  • 1
  • 1
FrankMonza
  • 2,024
  • 16
  • 26
  • unfortunately i cheered to soon.. it seems to work on the first glance, but now i get many crashes where some ressource files are not found, because they are not present in the default values folder. – user3292244 Oct 10 '15 at 10:35