If you look down on the process of making a website this will probably do:
- specifications
- design
- development
- test
- validation
Ok, during test and validation step, how many times a developer is asked to change sentences or fix typos ? how long does it take to find these sentences ? Too many times, and this is not a developer job to fix this issue. Developer code and hack, nothing more ;)
How a client or the marketing team can update texts without sending an email or opening a ticket to the development team ?
If the content is database related, then a nice backend will do the job. Texts from the user interface : labels, messages or title from dynamic page are not always easy to change as there are directly set in template files. It’s where you can loose time …
Now, depending on the tools you used, the following implementation can be easily exported. The idea is to create a function for every text content you used that are not database related. This function can store information, to be analysed and updated with a backend tool. Now the function has to accept a “context” parameter as a word or a sentence in one page can be the same at first but can be bespoken afterwards.
I am a big fan of the symfony framework, and for my current work, I have implemented such feature. The project is called mgI18nPlugin. This tool used the i18n feature, to record all texts from the template. The tool also add a new tab in the web debug toolbar to edit all text used in the page.
Why such tool is a great improvement?
Developer does not need to worry about wording as all texts can be done by the client. And as the tool uses the i18n sub framework, your project can be translated into different languages too.
Best way to use this tool.
When I used the plugin in template I use the following convention :
- always prefix the text : message_contact_header
- select a good prefix ! ‘btn’, ‘label’, ‘message’, ‘link’ or ‘title’
- always define a catalogue (context) linked to a same set of text
- redefine the label’s form, It you have the swToolboxPlugin installed you can call the static method
<?php
swToolboxFormHelper::resetFormLabels(sfForm, array('prefix' => 'label_', 'catalogue' => 'your_catalogue'))