Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

C# .Net Framework - How to create nuget package for strings localization

$
0
0

I have created a nuget package - SampleNuget1 with strings.resx and strings.ar-AE.resx as string Resource Files, with Access specifier - public so that it can be accessed from any assembly outside. And using it like below:

        CultureInfo ci = new CultureInfo("ar-AE");        SampleNuget1.strings.Culture = ci;        Thread.CurrentThread.CurrentCulture = ci;        Thread.CurrentThread.CurrentUICulture = ci;        Console.WriteLine(SampleNuget1.strings.Key1);

Still, above code is returning only default strings.resx file values and not the strings.ar-AE.resx values. Not sure how to make this work.

Note :- If I try the same using the SampleNuget1 as a project reference in any solution, it works fine. It only returns default strings when it is used as nuget package.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>