title: How to check locale against message.properties
body: <p>I am using hibernate and RestEasy API to make a server. i have 3 properties files <code>message.properties a, mesage_en-GB.properties and message_en.propperties</code> files. 
  When I get a request from client , it have locale in header param. I need to check this locale against my properties file, i.e. if it is en-GB than use  mesage_en-GB.properties, if not given than use message.properties, and if wrong enter than give error message.
  but am not getting how to compare these values.
  please suggest.</p>