Can I localize (or customize) a default Kentico resource string using the Localization app?

Jake Burgy asked on May 19, 2015 20:58

I know that you can customize the UI strings from the CMS.resx file if you use the same key name, inserting the new string you want into your Custom.resx file.

But is it possible to override what's in the CMS.resx file with the Localization app? For example, if I wanted to override the default validation error text that Kentico ships with (general.errorvalidationerror), I would think that creating a new localization string in the Localization app with the same key name (and the same locale) would cause the system to use the value in the database, since it takes precedence over what's in the CMS.resx file according to resource string priority, but it has no effect.

So, for built-in Kentico resource strings, do you have to use the Custom.resx file, or is there some way you can use the Localization app to override the strings?

Correct Answer

Jake Burgy answered on May 19, 2015 21:13

Ah, I had the wrong key! There are 5 different "errorvalidationerror" keys that all have the exact same value (one for "general", one for "cmsform", one for "bizform"...), and I was just using the wrong one.

The lesson here: Make sure you have the right key that you want to edit! There are often multiple resource strings that have the same text associated with them.

0 votesVote for this answer Unmark Correct answer

Recent Answers

Brenden Kehren answered on May 19, 2015 21:05 (last edited on May 19, 2015 21:08)

By default, the order of usage is (see documentation):

  • Database
  • Custom.resx
  • CMS.resx

So if you choose to create your own versions of the base (CMS.resx) strings all you need to do is find the actual key name and enter that in the Localization app and enter your value. By default then, Kentico will serve up the database version since it was found vs. going to the file(s).

When you're done, depending on your cache settings, you may need to clear your cache.

Also check your config file for this key which would reverse the priority and make the database last priority:

<add key="CMSUseSQLResourceManagerAsPrimary" value="false" />

2 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.