Resources / Labels
Hello,
We need to implement quite a bit of localized "fixed" content on our pages, and want to use custom resource classes and the SF label administration to manage them. My question is: where is the data stored when it is updated via the admin? In the database, in file-system files, or both?
We can see that .resx files are created under App_Data/Sitefinity/GlobalResources when we update the content of our custom classes, but we thought those were just re-created by SF as needed. After a deploy, which did not include those .resx files, we noticed that our translated values were not appearing on the site or in the admin screens.
Do we need to deploy those generated .resx files?
Thank you for any insight!
Regards,
John
UPDATE:
This is important for us because we will need to run Sitefinity in a load-balanced scenario.
Regards,
John
Hi John,
External resources installed trough Interface labels & messages are not stored in the database, but in the GlobalResources folder so you will need to deploy them too.
Regards,
Stanislav Velikov
the Telerik team
Hello,
Is there a way to store the translations into the database? Because we run our sitefinity instances on azure webroles, and now the translations after deployment are 'lost'...
kind regards,
bob
Hi,
There is no implementation to handle and read sitefinity .resx files from the database. A workaround is to set the build action of the .resx files (right click the file ->properties->build action) to embedded resource to embed the .resx in the assembly of the project they are used in and refer them from the assembly reference not from file system.
Regards,
Stanislav Velikov
Telerik
Dear Stanislav,
At this moment we are busy with deploying our Sitefinity project to Azure Webroles. In our view, the solution that you suggested is not quite the solution. If Microsoft will be performing a re-image on the Windows Azure WebRole, the content will be put down as it was deployed. If labels are changed, these changes will disappear. This because the .resx files are put back as these were original. Is there a solution from your side to solve this problem?
Hello John,
Our resources implementation is still the same. The resx files are stored in the GlobalResources folder and there is no implementation available that can send these entries to the database. Therefore the solution Stanislav proposed remains the only solution to this.
Regards,
Ivan D. Dimitrov
Telerik
Hi Ivan,
This has again become an issue for us. I wanted to check in and see if anything has changed regarding custom/localized resource management.
Is there some other best practice for managing labels and resources (updates to existing, and also custom resources) in the cloud? Locking changes down to deployment-only, and losing administrative changes in Azure is unnacceptable to a lot of our clients in the age of Cloud Computing.
Regards,
John
Hello,
There is no change yet. The labels and resx files cannot be stored in the database. This is a limitation. It also affects cloud based deployment. This is why if using Azure, for instance, you must prepare locally and include in the deployment package all themes, labels, and other resources that are kept in App_Data folder. Once the project is deployed, they must remain read-only. For example, to include an imported language pack in the deployment, include the ~/App_Data/Sitefinity/GlobalResources folder in project.
Regards,
Stanislav Velikov
Telerik
Hi John,
I was on a project that used Azure VMs and to get around this we created a shared GlobalResource folder that the instances used. Hope that helps or let me know if you want more details.
-Ben