generally you should use
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
<application>
<locale-config>
<default-locale>it</default-locale>
<supported-locale>it</supported-locale>
<supported-locale>en</supported-locale>
<supported-locale>de</supported-locale>
</locale-config>
<resource-bundle>
<base-name>/bundle</base-name>
<var>bundle</var>
</resource-bundle>
</application>
</faces-config>
and get labels via
<p:outputLabel for="name" value="#{bundle.foo}" />
<p:inputText id="name" value="#{formProject.entity.name}"/>
<p:message for="name" id="msgName" />
but while you can access dotted names this way
<p:outputLabel for="name" value="#{bundle['foo.bar']}" />
you can't pass arguments (i don't know how to do it without an interpolator, or if it is possible at all)
an hybrid solution can be
@ManagedBean
public class LabelBean
{
private String getText(String key, String... args)
{
String message = Faces.evaluateExpressionGet("#{bundle['" + key + "']}");
return MessageFormat.format(message, args);
}
public String getText1(String key, String arg)
{
return getText(key, arg);
}
public String getText2(String key, String arg1, String arg2)
{
return getText(key, arg1, arg2);
}
}
in similar way @hwellmann proposed (+1)