Foren
language.properties file
Abhi Ed, geändert vor 11 Jahren.
language.properties file
Regular Member Beiträge: 118 Beitrittsdatum: 04.06.12 Neueste Beiträge
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, geändert vor 11 Jahren.
RE: language.properties file
Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
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, geändert vor 11 Jahren.
RE: language.properties file (Antwort)
Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
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, geändert vor 11 Jahren.
RE: language.properties file
Regular Member Beiträge: 118 Beitrittsdatum: 04.06.12 Neueste BeiträgeHitoshi 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!!!