Re: multi-language url rewiting. Is it possible?

Splash Forums PrettyFaces Users multi-language url rewiting. Is it possible? Re: multi-language url rewiting. Is it possible?

#23433

If you want to use h:link, you will also have to used named parameters. See:

http://ocpsoft.org/docs/prettyfaces/3.3.3/en-US/html/Configuration.html#config.pathparams

So you will have to change the mapping to this:

<url-mapping id="base">
<pattern value="/#{ locale : localeChanger.languageCode }/main" />
</url-mapping>

And then add the name attribute to the <f:param> tags:

<h:link outcome="/pages/main/welcome.jsf" value="#{msgs.info}">
<f:param name="locale" value="#{localeChanger.languageCode}" />
</h:link>

See also:

http://ocpsoft.org/docs/prettyfaces/3.3.3/en-US/html/components.html#components.jsf