question

jmot77-1475 avatar image
0 Votes"
jmot77-1475 asked WenyanZhang-MSFT edited

Xamarin Forms localization iOS Native Library

0


I have an iOS library that uses localized string files. When used in a native iOS project in XCode, this library renders the proper text just fine.

However, when imported into a Xamarin Forms project, the library is not able to properly display the localized text. It seems to not find any of the string files at all. The method of localizing a Xamarin Forms project does not seem to be working for this library (ie the plist file, Base folder and other langs). Images referenced by the library work fine though.

Is there a different way for library projects to find localized files than normal Xamarin Forms projects?

Here is the link to the approach for localization in Xamarin.iOS. I realize this is not Xamarin Forms but it's the approach I used.

https://docs.microsoft.com/en-us/xamarin/ios/app-fundamentals/localization/

dotnet-xamarin
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @jmot77-1475 , I'm not sure how did you invoke your library in native iOS project in XCode and how did you import this library to your Xamarin Forms project. But you say, no other resource files work except images. You could try to check if your lproj file is placed in the Resources folder, and check if the Build Action is Bundle Resource. And invoke your iOS method in Xamarin Forms by DependencyService .


0 Votes 0 ·

0 Answers