title: JSF/Seam messages.properties without _xx which language is that?
body: <p>i just wanted to know as which language the default messages.properties is read. </p>
  
  <p>i thought that it is the in the faces-config.xml configured default locale is:</p>
  
  <pre><code>&lt;locale-config&gt;
    &lt;default-locale&gt;de&lt;/default-locale&gt;
    &lt;supported-locale&gt;de&lt;/supported-locale&gt;
    &lt;supported-locale&gt;en&lt;/supported-locale&gt;
  &lt;/locale-config&gt;
  </code></pre>
  
  <p>it contains no <code>&lt;message-bundle&gt;</code> tag,i created a messages.properties, messages_en.properties and messages_de.properties. To access the values i use this code</p>
  
  <pre><code>ResourceBundle resourceBundle = SeamResourceBundle.getBundle();
  String bundleMessage = resourceBundle.getString("key.something");
  </code></pre>
  
  <p>In the menu i used this to show (and switch) the language what works fine</p>
  
  <pre><code>&lt;h:selectOneMenu value="#{localeSelector.localeString}"&gt;
    &lt;f:selectItems value="#{localeSelector.supportedLocales}"/&gt;
  &lt;/h:selectOneMenu&gt;
  </code></pre>
  
  <p>Now it doesn't matter what language i select, je always uses the messages.properties and not _de or _en. Do i need a concrete class for <code>&lt;message-bundle&gt;</code> to find also the _de and _en resource bundles? </p>
  
  <p><strong>EDIT:</strong> </p>
  
  <pre><code>ResourceBundle resourceBundle = SeamResourceBundle.getBundle();
  java.util.Locale locale = resourceBundle.getLocale();
  </code></pre>
  
  <p>Contains always the correct locale de or en but always uses messages.properties and if this file is deleted, returns just the key as if he found no other file. The messages*.properties are in the /WEB-INF/classes folder. </p>
  
  <p>i tried now to take <code>Map&lt;String, String&gt; messages = org.jboss.seam.international.Messages.instance();</code> It contains also the values from messages.properties and not _de or _en </p>
  
  <p>Using <code>#{messages[key.label]}</code> in the *.xhtml file also returns just the messages.properties values but not from _de or _en. </p>
  
  <p>But a messages_de properties or _en directly in the xyz.war file with a <code>&lt;a4j:loadBundle var="i18n" basename="messages"/&gt;</code> does work. (thats how i did the i18n in the "not Java" frontend)</p>
  
  <p>two more tries always return just the default properties and not _de or _en</p>
  
  <pre><code>resourceBundle =  context.getApplication().getResourceBundle(context, "messages");
  
  java.util.Locale locale = new java.util.Locale("de");
  resourceBundle = ResourceBundle.getBundle("messages",locale);
  </code></pre>
  
  <p>if i create a new messages2_de.properties and *_en* and use the code above, everything works fine. </p>
  
  <pre><code>java.util.Locale locale = new java.util.Locale("de");
  resourceBundle = ResourceBundle.getBundle("messages2",locale);
  </code></pre>