|Number of votes:||3|
I guess there might be a couple of these tools out there but I haven’t seen one so here is my take on it.
Note that this version is for CMS 7 / 7.1 since the structure of the xml files have changed in 7.5.
As we all know localization of page type names, property names as well as all other descriptive texts has always been managed with xml resource files.
Manually editing xml files, especially when you have a multiple language site is a bit of a pain. And with CMS7 we really don’t want to have property names etc in the model classes needing a recompile/deploy just to change a label or help text.
So I decided to build a small tool to give us developers more time to develop fun stuff.
The tool is an admin plugin and looks like this.
The dropdown is filled with all enabled languages. If you want to change language change the value and click refresh.
It parses all types, categories, tabs etc in the CMS and tries to get a localized text.
This means that if you for example remove some page type properties you only need to go into the tool and press save on the page type – properties tab to save a new version of the page type properties file. So it’s very easy to keep the xml files updated with no unused texts.
The tool has seven tabs which let you manage texts for page types and their properties, blocks and their properties, Views (solution specific), categories and tabs.
The tool is pretty straight forward though mainly aimed for developers. You build your page or block types and before checking in of the code you go to admin mode and setup the correct texts ( don’t forget to check out the xml files for edit if you have any type of source control).
Note that the save buttons are unique per tab. So if you have done some changes to the page type tab you need to save that before proceeding with additional changes.
A unique named xml file is created for each of the tabs.
If you have a multi language site and want to create sample xml files for a translator you can just change the language in the dropdown without click on refresh and then go to each tab and click save to create xml files for that particular language.
If you don’t set the appsetting “resourcemanagerpath” to the relative path of your xml files it will save files as well as look for a Views_xx.xml file in the lang folder. The path should start and end with a slash
I’ve compiled a package that you can get over at my skydrive. Just unzip the package and drop the bin and plugin folders into your solution. I’ve also enclosed a Views_en.xml file with translations for the tool and of course also the source code.
As I mentioned in the beginning of the post this is for v 7 / 7.1. I have a 7.5 version in the works bat that will be another post.
Hope you find it as useful as I have.
Update: Forgot the download link: Skydrive