I have found the mistake. The problem is with the settings in faces-config.xml file. The correct setting are as follows..
<application>
<locale-config>
<supported-locale>en</supported-locale>
<supported-locale>fr</supported-locale>
</locale-config>
<resource-bundle>
<base-name>com.messages.messages</base-name>
<var>msg</var>
</resource-bundle>
</application>
In the above code the base-name is the location of the properties file. In my example the package name is com.messages and the properties file is messages. Here I have taken two locales of english and french. The default locale I selected is English(en). According to the locale selected by the user it picks up either the messages_en.properties or messages_fr.properties.