I'm trying to internationalize my application and been searching a lot of tutorials on that. I always get stuck at this point, for no matter what configuration I do, none of them works.
Earlier I made a post onto a parsing exception. After solving this parser exception, now the application does not find bundles.
I arranged and registrated the Core bundle through faces-config.xml, as well as supported locales.
Even though I've searched through existing solutions but none of them seem to apply to my case.
So, where's the thing? Does it have to be at root folder? Is it a misconfig? A typo in my faces-config (don't think so, I redid it many times).
The config is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config 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"
version="2.2">
<application>
<!-- <message-bundle>messages_en_US</message-bundle> -->
<!-- <message-bundle>messages_es</message-bundle> -->
<!-- <message-bundle>messages_pt_BR</message-bundle> -->
<locale-config>
<default-locale>en_US</default-locale>
<supported-locale>pt_BR</supported-locale>
<supported-locale>es</supported-locale>
</locale-config>
<resource-bundle>
<base-name>com.tfduque.fieldassist.interface</base-name>
<var>msg</var>
</resource-bundle>
</application>
</faces-config>
Folder/package organization:
Stack trace (FULL: https://pastebin.com/69iJrvuX):
Type Exception Report
Message Can't find bundle for base name com.tfduque.fieldassist.interface_es, locale pt_BR
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
javax.servlet.ServletException: Can't find bundle for base name com.tfduque.fieldassist.interface_es, locale pt_BR
javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
interface_es_pt_BR.properties
which is indeed not there so the error is correct! – Kukeltje