掲示板
language.properties file
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 ?
11年前 に David H Nebinger によって更新されました。
RE: language.properties file
Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
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.
11年前 に Hitoshi Ozawa によって更新されました。
RE: language.properties file (回答)
Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
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]);
11年前 に Abhi Ed によって更新されました。
RE: language.properties file
Regular Member 投稿: 118 参加年月日: 12/06/04 最新の投稿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!!!