As other SimpleButton names, with each Column in the GridControl Caption attribute value is the need to manually set,
Set up after the completion of the need to program entrance class to execute
Thread. CurrentThread. CurrentCulture=new System. Globalization, CultureInfo (" useful - CN ");
But this method must restart once take effect;
Is there any way I can change language directly, don't have to restart again?
CodePudding user response:
After I carried out the following code
//The following line provides localization for The application 's user interface.
CultureInfo culture=CultureInfo. CreateSpecificCulture (" useful - CN ");
Thread. The CurrentThread. CurrentUICulture=culture;
//The following line provides localization for data formats.
Thread. The CurrentThread. CurrentCulture=culture;
//Set this culture as the default culture for all threads in this application. The
//Note: The following properties are supported in The. NET Framework 4.5 +
CultureInfo. DefaultThreadCurrentCulture=culture;
CultureInfo. DefaultThreadCurrentUICulture=culture;
I perform again
InitializeComponent ();
Results Chinese interface, BUT and the overlap of the original, page layout the whole big confusion,
You have to solve the thinking of?
How to make the control on the premise of not restart to reload the language resource files?
CodePudding user response:
InitializeComponent(); This is initialization interface controls, has imposed a, must perform will mess,Control does not restart, can try to hide the original interface, and changing the language, to the new one interface, can? Then Kill the old interface
CodePudding user response:
Try clear the cache?Thread. The CurrentThread. CurrentUICulture=CultureInfo. GetCultureInfo (name);
Thread. The CurrentThread. CurrentUICulture. ClearCachedData ();
Thread. The CurrentThread. CurrentCulture=CultureInfo. GetCultureInfo (name);
Thread. The CurrentThread. CurrentCulture. ClearCachedData ();
CodePudding user response: