Upgrades Questions on upgrading to version 4.x.
Version 4.x > Upgrades > Custom Resources file not working View modes: 
User avatar
Member
Member
Darren - 3/26/2009 12:29:21 PM
   
Custom Resources file not working
I have recently upgraded from 3.1a to 4.0 and now all my resource entries (error messages, custom labels etc) have reverted to default. I have a custom resources file, named custom.resx, but the cms seems to be ignoring it. It worked fine before the upgrade.

Anyone have any ideas, have I missed something obvious?

Cheers,

Darren

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 3/30/2009 6:07:42 AM
   
RE:Custom Resources file not working
Hi,

In the version 4.0 were changed several keys to the strings. Could you please check the strings which you have changed in your custom.resx file if they are still the same? I am sorry for this inconvenience.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
Darren - 4/14/2009 9:22:54 AM
   
RE:Custom Resources file not working
Hi Juraj,

Sorry for the delay but I've just come back to this. I've matched up the string keys in the en-GB file and my custom file and they both match.

It's not taking anything from my Custom.resx file. I also tried commenting out some strings in the en-GB file and nothing else was picked up.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 4/15/2009 2:44:27 AM
   
RE:Custom Resources file not working
Hi,

I am sorry for the confusion, in v4.0 the behavior was changed and the "cms.resx" file has the highest priority. "Custom.resx" file is the second.

Could you please try to remove the strings you have translated from the default "cms.resx" file? If they are not found there, the second priority is applied, in this case the custom file. I hope it will help. I will also check whether is this bug or not. I am sorry for the inconvenience.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
Darren - 4/15/2009 3:56:00 AM
   
RE:Custom Resources file not working
Well I've tried that but still the same unfortunately. If I take out the strings from the main 'CMS.en-GB.resx' file it doesn't cascade down to the Custom.resx file. I just get missing strings.

This looks like it could be a bug. As a workaround for the moment I have just amended the main resources file as I havent got that many translations in my custom file, but if someone could check if this is a bug that would be greatly appreciated.


User avatar
Kentico Support
Kentico Support
kentico_jurajo - 4/16/2009 4:00:03 AM
   
RE:Custom Resources file not working
Hi again,

I have checked this behavior and it is definitely wrong behavior - bug. I am sorry for this inconvenience.
I hope that it will be fixed in the next hotfix package.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
Steve-Appetere - 5/15/2009 12:04:54 PM
   
RE:Custom Resources file not working
I've just loaded Hotfix V4.0.3 & the behaviour is still the same. Do you have any timescale on when a Hotfix will be available?

The Developer's Guide will need updating too, as this extract shows:


Priority of the resource strings

When looking for a localized strings, the system uses the following priority:

1. cms.resx
2. custom.resx
3. database (Site Manager -> Development -> UI Cultures)

It means if there are duplicate strings with same name in all three files, the system will use the one stored in the filesystem (cms.resx).


Clearly the priority should be:

3 first, then 2, then 1, rather than the current
1 first, then 2, then 3

Thanks,

Steve

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 5/26/2009 5:15:41 AM
   
RE:Custom Resources file not working
Hi Steve,

We will definitely give custom.resx higher priority then cms.resx in version 4.1. We will also consider giving higher priority to database, but it may have negative impact on performance, so we will further investigate this.

In a meantime, please add your strings both to cms.resx and custom.resx so it works both in 4.0 and 4.1.

Best Regards,

Martin Dobsicek