Cross-Platform Library

Hey people, iam new to Xamarin development and have a question. I have a Xamarin.Forms Project with a iOS and Android Part. I followed the Documentation to include Localization and it works perfectly. I used the interface and Dependencie Service Approach. Now i made a Xamarin.Native Android Application that will focus on a different device, but share the same language strings (localization). I dont want to implement the Localization again for the native Project but create a Library that does the Localization for iOS and Android, that i can use in both Projects then. I just want to ask the Library for a Translated string and not pass in the language or OS of the Device. The whole native part that is currently impelemented with a interface in the Xamarin.Forms Project should be done inside the Library. What is the best approach to do this? Should i use a Shared Library or a Xamarin.netStandard? I dont like the #ifdefs of shared libraries to check the device OS. Thank you for your help already!

Answers

  • jezhjezh Member, Xamarin Team Xamurai

    Sorry, I could not fully understand the means of you by I just want to ask the Library for a Translated string and not pass in the language or OS of the Device. The whole native part that is currently impelemented with a interface in the Xamarin.Forms Project should be done inside the Library.

  • VUhlmannVUhlmann Member

    Hey, sry for the misunderstanding. The question is basically, what is the best approach for a library, that can be implemented into multiple Xamarin Projects and has access to native controls.

Sign In or Register to comment.