Пример #1
0
        static void Main()
        {
            DatabaseResourceManager rm = new DatabaseResourceManager(
                "server=(local);database=LocalizationDemo;trusted_connection=true");

            Console.WriteLine(rm.GetString("Welcome",
                                           new CultureInfo("es-ES")));
            Console.WriteLine(rm.GetString("ThankYou",
                                           new CultureInfo("it")));
            Console.WriteLine(rm.GetString("GoodMorning"));
        }
Пример #2
0
        private static void Main()
        {
            ResourceManager resourceManager          = new DatabaseResourceManager(ConnectionString);
            var             spanishWelcome           = resourceManager.GetString("Welcome", new CultureInfo("en-US"));
            var             italianWelcome           = resourceManager.GetString("ThankYou", new CultureInfo("it"));
            var             threadDefaultGoodMorning = resourceManager.GetString("GoodMorning");

            Console.WriteLine(spanishWelcome);
            Console.WriteLine(italianWelcome);
            Console.WriteLine(threadDefaultGoodMorning);
        }