Labels & Messages Issues
Hi Telerik team
When adding a new label to Interface Labels & Messages and later changing the text of the label, all pages and control that are using that resource continue to show the old value even though the backend shows the correct, edited text.
Can someone please tell me why???
Thanks
Hello Luyen Minh,
It seems that the issue might be related to some caching. Can you please try to clear the browser's cache and then test the behavior again. You may also try to restart the application and then browse the pages again. This should resolve the issue.
If the issue still persists after clearing the cache and restarting the application, can you please let me know which are the labels you have edited on your side and more details about the exact use case scenario and the issue you are experiencing in order to try to test the behavior on my side.
Regards,
Sabrie Nedzhip
Telerik
Hello Sabrie Nedzhip,
I think my problem is Culture. (My Culture is "EN" )
When I create a new label in sitefinity backend, Application will create two resource file: Labels.en.resx and Labels.resx
When I update my label: Data in Labels.resx (Invarient language) was changed but data in Labels.en.resx wasn't change.
Default Culture in backend is "EN" and here is my code to get label:
var resource = ResourceManager.GetManager();
var response = resource.GetResourceOrEmpty(Thread.CurrentThread.CurrentCulture, resourceType, resourceKey);
if (response != null) result = response.Value;
So could you please tell me how to change data in Labels.en.resx from backend
Thanks you
Hello Luyen Minh,
Can you please try to get the label using the following sample code:
var resources = Res.Get<ResourcesClassName>();
var labelText = resources.Get(
"LabelName"
);