I have localized my Xamarin.Forms project (PCL approach). Additionally, I added another PCL as reference to this project by referencing the output dll from the Debug folder. This PCL is also localized after the same approach like the Xamarin.Forms project by using RESX files and setting the culture with AppResources.Culture = ci;
The current issue is, that this works as expected on my local machine, but not on the build server (Jenkins calling MSBuild). The difference also is that I work in the Debug mode, the generated apk file (Android) is build in the Release mode. But regardless of the mode, locally the localization is working fine in both modes! On the build server the resulting apk file contains now a mixture of two languages:
- Localized strings according to the current device language (Xamarin.Forms project)
- Non localized strings from the additional PCL (only showing strings from the language neutral RESX file)
Now I don't understand why this works locally, but not on the build server side. What I tried:
- I logged the culture in the "faulty" generated apk from the build server and it is correctly set (in both the app and the additional PCL)
- I checked the loaded resources and one
AppResources.resourcesis showing up (apparently it contains all RESX files including the language-specific resources?) - I tried to locally call
MSBuildsimilar to the task done on the Jenkins build server, but as always, locally it is working fine - Followed the instructions from Xamarin, but I didn't find any solution
- Device culture is e.g.
en-US, but my language neutral RESX file is set toen. I tried to add aAppResources.en-US.resxfile to the additional PCL, but the system still shows the content from the language neutral RESX file.
Is this a configuration issue on the build server in combination with MSBuild? If yes, what is different or missing? Or is this a code issue? Is this a problem using the same name AppResources for localization in both projects (XF and additional PCL)? Do you have any hints for me to find this issue?