Localization in Xamarin.Forms Shared project

I am facing issues while implementing localization in Xamarin.Forms Shared project. I already visited couple of web site where it is mentioned that Shared project is not recommended and there are some limitations.But I didn't find the details of it. I've included some resource files (en-US,fr,fr-CA,it,pl) inside the Resx folder and default resx file is having designer.cs.
Now my problem is, whenever I am selecting fr-CA it is picking up the value from fr related resx file and it is happening in the code behind only. But Xaml it is working fine.

In Xaml code snippet is like below:
Text="{locale:TranslateExtension Username}"

in Xaml.cs taking the value from AppResource:
BtnLogin.Text = AppResources.KEYLOGIN

I am not getting any clue on that. Your help is highly appreciated.

Best Answer

Answers

  • BikashGhosh.3220BikashGhosh.3220 USUniversity ✭✭

    I am not getting any error but from code behind app is picking up the wrong resx. So, you are saying I need to call TranslateExtension method as well from code behind instead of taking value from AppResources?

Sign In or Register to comment.