Improve resource file support (#2511)
* Add satellite assemblies to deps file with locale data * Publish satellite assemblies to output during publish * Copy satellite assemblies from project-to-project dependencies on build and publish
This commit is contained in:
parent
777e75f0a9
commit
852446e859
22 changed files with 519 additions and 15 deletions
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Resources;
|
||||
using System.Reflection;
|
||||
using System.Globalization;
|
||||
|
||||
namespace TestProjectWithCultureSpecificResource
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var rm = new ResourceManager(
|
||||
"TestProjectWithCultureSpecificResource.Strings",
|
||||
typeof(Program).GetTypeInfo().Assembly);
|
||||
|
||||
Console.WriteLine(rm.GetString("hello"));
|
||||
Console.WriteLine(rm.GetString("hello", new CultureInfo("fr")));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue