| |

VerySource

 Forgot password?
 Register
Search
View: 862|Reply: 6

Multilingual issue

[Copy link]

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-3-19 14:30:01
| Show all posts |Read mode
The .net 1.1 system has been in use for some time, and suddenly requires the implementation of other language versions. . .
Ask you solutions. .
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-6-24 13:45:01
| Show all posts
Using Resource Manager

using System;
using System.Resources;
using System.Threading;
using System.Reflection;
using System.Globalization;
class ResourcesExample
{
    public static void Main()
    {
        // Create a resource manager to retrieve resources.
        ResourceManager rm = new ResourceManager("resourceManager.Application",
            Assembly.GetExecutingAssembly());

    // Get the culture of the currently executing thread.
    // The value of ci will determine the culture of
    // the resources that the resource manager retrieves.
    CultureInfo ci = Thread.CurrentThread.CurrentCulture;

   
    // Retrieve the value of the string resource named
    // "welcome", localized for the culture specified by ci.
    String str = rm.GetString("welcome", System.Globalization.CultureInfo.CurrentCulture);
    Console.WriteLine(str);
    }
}

The resource file must be written as the assembly name. The resource file name does not include the extension
Reply

Use magic Report

0

Threads

119

Posts

67.00

Credits

Newbie

Rank: 1

Credits
67.00

 China

Post time: 2020-6-25 20:15:01
| Show all posts
A lot can be found!
Reply

Use magic Report

0

Threads

8

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-6-25 23:45:01
| Show all posts
Don't understand what multi-language is needed; the program written?
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-7-8 12:15:01
| Show all posts
Is it enough to use resource files? Does it need to be implemented in the database?
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-7-9 15:15:01
| Show all posts
Don't understand what multi-language is needed; the program written?
---------

Sorry I didn't make it clear, multi-language refers to Chinese English and so on. .
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-7-10 22:00:01
| Show all posts
Thanks a little, thank you
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list