0

I have an application in Xamarin crossplatfrom. I created a solution for localize strings and it is working perfect. I am setting:

StringResources.Culture = DependencyService.Get<ILocalize>().GetCurrentCultureInfo();

But I have a problem with image resoruces. I created folders in android app:

drawable, drawable-pl-rPL, drawable-pl-rPL-hdpi, drawable-pl-rPL-ldpi, drawable-pl-rPL-mdpi

But I have no idea how to set global culture for app. I was trying to put in MainActivity class:

var ci = new System.Globalization.CultureInfo(lastLanguage);
Thread.CurrentThread.CurrentCulture = ci;
Thread.CurrentThread.CurrentUICulture = ci;

Where lastLanguage is a code for lasdt selcted language (en or pl-PL). But it is not working, image is always taken from drawable folder, no from drawable-pl-rPL

Can you help me somehow?

Chris
  • 785
  • 5
  • 12
  • 29
  • You probably need to change the local on the android os level. Here is an example of how to do that http://stackoverflow.com/a/4986481/1341538 – Andres Castro Jun 21 '16 at 13:25
  • No it doesn't work. When I debug OnCreate method in MainActivity and check resources->Locale it is pl-PL but images are shown from main folder – Chris Jun 22 '16 at 11:06

0 Answers0