Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Alba García
JSF portlet i18n
May 10, 2012 2:36 AM
Answer

Alba García

Rank: Junior Member

Posts: 49

Join Date: February 10, 2011

Recent Posts

I would like how get a jsf portlet internationalized in several languages. For example es_ES and en_US.


¿Does anybody know how and wich configuration files must have been modified?


Thanks in advance!
Oliver Bayer
RE: JSF portlet i18n
May 10, 2012 6:51 AM
Answer

Oliver Bayer

Rank: Liferay Master

Posts: 883

Join Date: February 18, 2009

Recent Posts

Hi Alba,

if you're facing Liferay JSF bugs I can't help because I don't use JSF portlets. But if you need a how-to I can give you some hints how it's done in a standalone web application.

  1. define your resource bundles inside faces-config.xml (the base-name is the package path to your language keys and var is the shortcut used in the jsf markup)
  2. use the language keys in the jsf markup

Examples for:

1)
1<resource-bundle>
2    <base-name>content.mylanguagekeys</base-name>
3    <var>mlk</var>
4</resource-bundle>

2)
1<h:outputText id="test" value="#{mlk.some-language-key}" />

HTH Oli
Neil Griffin
RE: JSF portlet i18n
May 10, 2012 6:58 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2256

Join Date: July 26, 2005

Recent Posts

Here's a blog post that hopefully answers your question.