API Questions on Kentico API.
Version 6.x > API > Resources View modes: 
User avatar
Member
Member
positivepurchasing - 5/18/2012 9:05:52 AM
   
Resources
Hi

I see in Kentico you have a folder called 'CMSResources' which contains .resx files.

Is there a reason why you have implemented your own resources system rather use the standard Resources system in asp.net?

Cheers

User avatar
Kentico Support
Kentico Support
kentico_janh - 5/21/2012 1:44:46 AM
   
RE:Resources
Hello,

In this way, you can easily customize any internal text/label in Kentico CMS and also create culture versions of user interface.

Best regards,
Jan Hermann

User avatar
Member
Member
positivepurchasing - 6/13/2012 5:19:17 AM
   
RE:Resources
Hi

OK I see, it is so that you can change the resource value(s) in the Kentico CMS UI, OK that makes sense.

So will the CMS.resx file be over written and any changes lost during a Kentico upgrade?

Cheers
Paul

User avatar
Kentico Support
Kentico Support
kentico_janh - 6/13/2012 5:47:39 AM
   
RE:Resources
Hello,

Yes, the upgrade process replace old resx file with a new one, but the Kentico Installation Manager should recognize, if the file was modified and leaves its copy in a filesystem (or you can make a backup for sure), so then you can just copy and paste your resource strings to the new one manually.

Best regards,
Jan Hermann

User avatar
Member
Member
positivepurchasing - 6/13/2012 5:50:02 AM
   
RE:Resources
Hi

OK, sounds fine.

Cheers
Paul.

User avatar
Member
Member
positivepurchasing - 6/13/2012 8:02:54 AM
   
RE:Resources
Hi Guys

In Kentico you seem to have a db table called 'CMS_ResourceString' which is used by the 'Site Manager' > 'Development' > 'UI Cultures' > 'Key / Value pair(s)' used to edit the text displayed on controls such as a button.

But how do I read a value in code so I can assign it to the Text property of a control?

Cheers
Paul

User avatar
Member
Member
positivepurchasing - 6/13/2012 8:20:25 AM
   
RE:Resources
OK found the information here

Developer Guide

Cheers
Paul

User avatar
Member
Member
positivepurchasing - 6/13/2012 8:50:25 AM
   
RE:Resources
Hi

From your documentation Kentico uses .resx files which makes sense. But what is the purpose of the db tables 'CMS_ResourceString' and 'CMS_ResourceTranslation'?

Cheers
Paul

User avatar
Member
Member
positivepurchasing - 6/13/2012 10:58:33 AM
   
RE:Resources
OK, never mind. I sussed it. The Db takes precedence.

Cheers

User avatar
Member
Member
Aon_Vlado - 6/20/2012 7:24:36 AM
   
RE:Resources
Yes, the upgrade process replace old resx file with a new one, but the Kentico Installation Manager should recognize, if the file was modified and leaves its copy in a filesystem (or you can make a backup for sure), so then you can just copy and paste your resource strings to the new one manually.


Jan,

This happened when I upgraded our v5.5R2. I added couple of our entries to the .new one and renamed it to the original name but I still do not see correct text in new labels. It looks like the CMS is still using my old resx file. What to do refresh it?

User avatar
Kentico Support
Kentico Support
kentico_janh - 6/20/2012 8:19:20 AM
   
RE:Resources
Hello,

When you make a change in the .resx file, you need to restart the application in Site Manager -> Administration -> System to apply changes.

Best regards,
Jan Hermann

User avatar
Member
Member
Aon_Vlado - 6/20/2012 8:41:06 AM
   
RE:Resources
Unfortunately this did not help. I even logged out and logged in back and waited until cache expired. I still do not see the right labels in CMS. Is there a script I can run?

Thanks,

Vlado

User avatar
Kentico Support
Kentico Support
kentico_janh - 6/20/2012 9:13:17 AM
   
RE:Resources
Hello,

No, there is no script to run, it should work by default. Could you please check if the resource strings which are not resolved are contained in that resx file?

Best regards,
Jan Hermann