We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

WPF Localization - How localizate ContextMenuItem

Thread ID:





131818 Jul 28,2017 09:24 AM UTC Aug 10,2017 02:08 PM UTC WPF 5
Tags: SfDataGrid
Asked On July 28, 2017 09:24 AM UTC

My application uses syncfusion localization mechanism.
Can i add the Name/Key in the resource file Syncfusion.SfGrid.WPF.resx (or if exist another way) for localize other items? 
For example i have the context menù of grouped drop area with "Collapse All, Expand All" actions,
when i execute System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("de");
I would like to locate it.
I hope you have some solutions. Thank you for your help.

Sivakumar R [Syncfusion]
Replied On July 31, 2017 07:33 PM UTC

Hi Alessandro, 

For localizing the application level string, you can use Resources.resx file in your application as below,  
        <MenuItem Header="{x:Static properties:Resources.MenuItem1}"></MenuItem> 
It is not possible to have application resources also in Syncfusion.SfGrid.WPF.resx since the default resource file in assembly won’t have these resources. 

Replied On August 4, 2017 10:29 AM UTC

Hi! thanks a lot!

I have another question, it's possibile change the value of one string (for example "ClearFiltered") from code??? 

Balamurugan Rajaraman [Syncfusion]
Replied On August 7, 2017 01:14 PM UTC

Hi Alessandro 
We have checked your query in our side and we cannot change the Localized string in resource file in runtime. Also, the localization string has been set based on the given cultureinfo in the sample while initial loading of SfDataGrid and we cannot change CurrentUICulture in runtime. 
Balamurugan R 

Replied On August 9, 2017 11:18 AM UTC

Hi, thanks for the answer.

Sorry but i can't change the value of the string after the initialize of the resources???

Balamurugan Rajaraman [Syncfusion]
Replied On August 10, 2017 02:08 PM UTC

Hi Alessandro 
Regarding your query "Change the value of the resource file at runtime" , it is not possible to modify the resource file in the runtime since the application has been initially compiled based on the existing resource file. Hence the desired changes based on your language in the resource file should be made before the app is compiled and the app should be re-initialized so that the app is now compiled with the modified resource file. Please let us know if you may have any other queries. 
Balamurugan R 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon