Hello,
we have problems with localization. We did the following:
In Program.cs in MyApp.Win we added
Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-DE");
Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE");
In the debug-directory we created a directory "de" and for testing purposes another "de-DE" with the same content. The content are 94 resource-files for German we downloaded yesterday.
Now the application is partially German and partially English. The context-menus of GridColumn-Headers are in English, the Report-Designer is German, its preview is English.
I tried an older version (12.1) out of the backup, there are all these elements in German.
Whats my mistake ?
Thank you
Michael
Hello Michael,
I have tried to reproduce this issue on our side, but without success. I have attached a video that illustrates my attempts.
As I can see from your code snippet, you are using an incorrect approach to set a language. Please refer to the Localization Basics article for more information on XAF localization.
In this article it is stated that we use the CustomizeLanguage event to set the preferred language.
Additionally, I suggest you read the Localization topic that describes in detail how to properly localize an XAF application and check your code.
You can also update to version 13.1.9. Probably, this issue was fixed in the current version.
Try these steps and let us know your results.
Hello Alexey,
the problem is not XAF-localization, this works and we know how to translate English elements.
The problem is the localization of the underlying winforms controls.
The code I used I found there:
http://help.devexpress.com/#WindowsForms/CustomDocument5755
After implementing your solution nothing has changed.
Where have you found 13.1.9 ?
Hello Michael,
Please accept my apologies for this misunderstanding. Currently, 13.1.9 has not been released yet.
I have tried to reproduce this issue using steps from the How to: Localize DevExpress WinForms Controls Using Satellite Assemblies article but without success. On my side the whole application is localized. I have attached a simple sample. Please try it on your side and compare with your application.
Hello Alexey,
thank you for your project, that works as it should. The main reason may be, that your resource files are 10 times as big as mine. Where did you get them from ? Those in the install-directory and those I downloaded from http://localization.devexpress.com/ are obviously incomplete, for not to say, empty.
Hello Alexey,
first I replaced my resource modules by yours. This didn't help.
Then I tried to run your project without your resource modules. Result: All translations are still correct.
Then I performed a repair of DXperience to be sure, that alle modules fit to the version i use. This didn't help.
The output log shows, that all german resource modules are loaded correctly from GAC.
If I create a directory "de" in bin\Debug, the files are loaded from GAC nevertheless.
Any ideas ?
Hello Michael,
>>The main reason may be, that your resource files are 10 times as big as mine. Where did you get them from ?
I have downloaded these assemblies from the The collection of localized DevExpress assemblies article.
Would you please send us a simple sample where this issue is reproducible? We will be happy to help you.
Additionally, I want to note that you can use approaches described in the Localization thread to localize your XAF application. Please take a look at our Localization Tool that is intended to simplify the localization of XAF applications.
Hello Alexey,
your last tip was the decisive.
In App.config the line
<add key="Languages" value="de-DE"/>
needed to be changed in
<add key="Languages" value="de;de-DE"/>
Thank you very much !
You're welcome.