Re: Best Practices for PrettyFaces and Multiple language sites

Splash Forums PrettyFaces Users Best Practices for PrettyFaces and Multiple language sites Re: Best Practices for PrettyFaces and Multiple language sites

#20703

aba
Participant

Hi,

Nice work. I can’t seems to figure out how to solve my problem though. So I will appreciate if someone can give me some idea.

I’m having a page. Let say:

http://mysite.com/some_page.jsf

I want it to be visible in different languages with different names. For example like this:

http://mysite.com/en/page_name_in_english

http://mysite.com/es/page_name_in_spainsh

My problem actually comes from the fact that on every page there is a menu that links to all pages and if I have:

<url-mapping>

<pattern>/#{lang}/page_name_in_english/</pattern>

<view-id>/some_page.jsf</view-id>

</url-mapping>

<url-mapping>

<pattern>/#{lang}/page_name_in_spainsh/</pattern>

<view-id>/some_page.jsf</view-id>

</url-mapping>

No matter from which one I came (/en/page_name_in_english or /es/page_name_in_spainsh) in the menu I see always the same (/XX/page_name_in_english – seems like the first one from the config file. Which to be honest does not come as surprise…).

Thanks,

Anton.