Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Abhi Ed
language.properties file
December 7, 2012 7:33 AM
Answer

Abhi Ed

Rank: Regular Member

Posts: 118

Join Date: June 4, 2012

Recent Posts

Hello friends ,

In language.properties, I can see following parameters .
warning-your-session-will-expire=Warning! Due to inactivity, your session will expire in {1} minute(s) . Session will time out after {0} minutes of activity.

From which files these parameterized arguments are fetched ?
David H Nebinger
RE: language.properties file
December 7, 2012 8:43 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11795

Join Date: September 1, 2006

Recent Posts

They are not fetched, they are passed arguments that the resource bundle uses. When you call the resource bundle and pass the key, you also pass the parameters and the {0}, {1}, etc. will be replaced with the parm values.
Hitoshi Ozawa
RE: language.properties file
December 9, 2012 3:33 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

The message is actually used in JavaScript statement below and parameters are passes as below.

instance._warningText = Liferay.Language.get('warning-your-session-will-expire');
instance._warningText = Lang.sub(instance._warningText, ['<span class="countdown-timer">{0}</span>', host.get('warningLength') / 60000]);
Abhi Ed
RE: language.properties file
December 12, 2012 2:11 AM
Answer

Abhi Ed

Rank: Regular Member

Posts: 118

Join Date: June 4, 2012

Recent Posts

Hitoshi Ozawa:
The message is actually used in JavaScript statement below and parameters are passes as below.

instance._warningText = Liferay.Language.get('warning-your-session-will-expire');
instance._warningText = Lang.sub(instance._warningText, ['<span class="countdown-timer">{0}</span>', host.get('warningLength') / 60000]);



Thanks Hitoshi for clarification!!!