bradymholt / cron-expression-descriptor

A .NET library that converts cron expressions into human readable descriptions.
https://bradymholt.github.io/cron-expression-descriptor/
MIT License
1.01k stars 188 forks source link

Set assembly's neutral language #164

Closed micahmo closed 1 year ago

micahmo commented 1 year ago

Hi, I am currently attempting to consume this library in a UWP app, and I've been experiencing issues loading resources from the neutral (English) language.

I discovered that this is a somewhat "well-known" issue (as far as UWP goes), due to the way it translates resx/resources to resw/PRI files. The solution is for the originating assembly to declare its neutral language.

For reference, here is that suggestion on StackOverflow: https://stackoverflow.com/a/60811293/4206279

Also as a point of comparison, Humanizer (which, similar to this library, distributes resources in many languages), has the same assembly attribute set: https://github.com/Humanizr/Humanizer/blob/main/src/Humanizer/Properties/AssemblyInfo.cs

In their case, they use the attribute directly in an AssemblyInfo file. But since we're using .NET Standard/Core here, we can set it in the project file. NeutralLanguage translates to the assembly attribute NeutralResourcesLanguage.

image

Thank you for your consideration!

bradymholt commented 1 year ago

Change looks good - thanks!

bradymholt commented 1 year ago

Published as 2.20.0.

micahmo commented 1 year ago

Thank you so much!