NuGet Packages / Extensions and Localization



  • Okay, here's the deal:

    I'm using some NuGet packages and non-Nuget extensions - both show this problem, so it's not something that's NuGet's fault.

    I'm still creating my app and I'm using localization. As I reside in Germany and my primary audience is German, I set the default language to de-DE.

    Then, through magic, I simply include a file in folders like this: Strings/de-DE/Resources.resw and I can access the localized strings both in XAML and Code just fine (Data Annotations would be a problem but I'm not localizing those).

    Now, however, I'm getting a boatload of warnings because several extensions obviously don't have resources for de-DE, something like this:

    Warning		
    No default or neutral resource given for 'Microsoft.WindowsAzure.MobileServices.SQLiteStore.Properties.Resources/SQLiteStore_DefineTableEmptyCtorNotDefined'. The application may throw an exception for certain user configurations when retrieving the resources.
    Warning		
    No default or neutral resource given for 'SQLitePCL.Resources/Platform_AssemblyNotFound'. The application may throw an exception for certain user configurations when retrieving the resources.
    

    Granted, it's only warnings, but they're irritating me. And I'm also not sure what might happen if I tried to push that one into the store.

    The naive approach of adding a SQLitePCL.Resources/Platform_AssemblyNotFound into my existing resource file does not work, of course. And my Google searches have yielded not-so-helpful answers.

    So, does anyone have an idea how to get rid of those warnings for good?



  • Never mind, figured it out. The solution:

    1. Don't change the default language, leave it at en-US
    2. Rename the de-DE folder to en-US
    3. Before you put the whole thing into production, copy the resource file over to a new de-DE folder and translate everything as needed.


  • @Rhywden said:

    Never mind, figured it out. The solution:

    Don't change the default language, leave it at en-US
    Rename the de-DE folder to en-US
    Before you put the whole thing into production, copy the resource file over to a new de-DE folder and translate everything as needed.

    How is that not more annoying than the warnings?



  • I only have to do that once.


Log in to reply