Improving your web apps personality with a language file

Every web application has a personality and your success and error messages play a large part in portraying it. 

The chapter “Personify Your Product” from Getting Real sums it up well:

What is your product’s personality type?

Think of your product as a person. What type of person do you want it to be? Polite? Stern? Forgiving? Strict? Funny? Deadpan? Serious? Loose? Do you want to come off as paranoid or trusting? As a know-it-all? Or modest and likable?

Once you decide, always keep those personality traits in mind as the product is built. Use them to guide the copywriting, the interface, and the feature set. Whenever you make a change, ask yourself if that change fits your app’s personality.

I use sessions (flashdata in CodeIgniter) to carry success or error messages between pages. However with message strings scattered across controllers it is hard to maintain any consistency.

I recently started using languages file to store all my error messages. Although typically used for localisation, placing all your error/success messages in one place makes it easy to write consistent, coherent copy.

If your status messages are dotted around a controller it is easy for one to be friendly and jovial “Ooops something went wrong. Our minions are on the case and will try and fix that for you” and the next to be dry and professional “An error occured. Our administrators have been notified and will try and fix the problem as soon as possible. Please try again later”.

It is a little more work, but the benefits are so clear that I now use this technique for all my projects.