Fórum
language.properties file
Abhi Ed, modificado 11 Anos atrás.
language.properties file
Regular Member Postagens: 118 Data de Entrada: 04/06/12 Postagens Recentes
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 ?
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, modificado 11 Anos atrás.
RE: language.properties file
Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
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, modificado 11 Anos atrás.
RE: language.properties file (Resposta)
Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
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]);
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, modificado 11 Anos atrás.
RE: language.properties file
Regular Member Postagens: 118 Data de Entrada: 04/06/12 Postagens RecentesHitoshi 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!!!