Custom resource class, Filtering
Hi,
I created a custom resource class as described here and here.
Everything worked fine but I am not able to filter in "Interface Labels & Messages" page.
My custom type is displayed in the "Filter by type" list on the right, but when i click on the type I allways get the whole list.
Perhaps I forgot something?
Kind regards
Udo
Hello Le,
There is a known issue about custom resources. It is logged as a bug, but currently we have not schedule the time frame for the fix.
Kind regards,
Ivan Dimitrov
the Telerik team
Is it possible to create an item in PITS for this, then we can vote for it. It is a very 'annoying' bug. I know have to give my end users a list with the names of the resources that can be translated. Then they have to search for them and even then, the search sometimes failes.
Regards,
Daniel
Hi Daniel,
Here is the PITS item for you. The bug is with status reopened and we will try to fix it for our upcoming releases.
Best wishes,
Victor Velev
the Telerik team
What would be a workaround for this? I need some labels and literals to be translated by the end user.
Is it possible to also add the different languages inside the custom resource class, if there is no other solution?
Regards,
Daniel
What exactly is the bug?
I know have created two resources inside my class:
[ResourceEntry(
"Movies_Grid_Title"
, Value =
"Movies"
, Description =
""
, LastModified =
"2010/12/01"
)]
public
string
Movies_Grid_Title
get
return
this
[
"Movies_Grid_Title"
];
[ResourceEntry(
"Downloads_Grid_Title"
, Value =
"Downloads"
, Description=
""
, LastModified =
"2010/12/01"
)]
public
string
Downloads_Grid_Title
get
return
this
[
"Downloads_Grid_Title"
];
Hello Daniel,
I created a test class with resources CustomModuleResources and registered it at Global.asax:
protected void Application_Start(object sender, EventArgs e)
Bootstrapper.Initialized += new EventHandler<Telerik.Sitefinity.Data.ExecutedEventArgs>(this.AfterInit);
private void AfterInit(object sender, ExecutedEventArgs args)
Res.RegisterResource<CustomModuleResources>();
I was able to view and add additional resources via "Interface Labels & Messages" page.
interface.
Let me know if you still experience problems with resources! Thanks!
All the best,
Hi Milena,
Thanks for your reply.
Yes, I did exactly how you described this. This went well the first time. After that, it is a total mess. Never getting the resources to show up. Only when the application has a cold start.
What I have to do now, to make translation work:
1. Create the custom class.
2. Initialize it like your example.
3. Manually add the Resource keys into a file named 'CustomTranslations.resx' inside my App_Data/Sitefinity/GlobalResources folder.
After these steps, I can search them inside "Interface Labels & Messages". I can adjust them and then it works.
But when I publish a new version of my website, I have to again translate all labels. So it seems the translations are not held inside the database (what I was assuming), but in other resource files, but they don't exist?
So, no idea what is the problem here.
Regards,
Daniel
Hi Daniel,
Your problem is the same as in this thread :
http://www.sitefinity.com/devnet/forums/sitefinity-4-x/general-discussions/sessions-amp-external-pages.aspx#1440244
There is a pits issue which is logged for this bug.
What i can suggest is to try to merge the resources. For example if you delete the resx file you will be able to save them again with all the new resource entries and then you can try to merge the resx files.