Actions

DateFunctions/ja: Difference between revisions

From LimeSurvey Manual

(Created page with "=メールテンプレートの使用例= 1000px")
(Created page with "このプラグインはExpressionManagerStart/jaプラグインを使用し、この関数を作成します。この2つの関数はJavaScriptは使用しておらず、...")
Line 10: Line 10:
** The language used for localization defaults to current session language. If the current language is not configured in the survey, the survey base language will be used. When using in email templates, please use the token language as parameter as to set the expected language. Example: TOKEN:LANGUAGE
** The language used for localization defaults to current session language. If the current language is not configured in the survey, the survey base language will be used. When using in email templates, please use the token language as parameter as to set the expected language. Example: TOKEN:LANGUAGE


This plugin uses the [[ExpressionManagerStart]] plugin, and it creates this function. These 2 functions don't use JavaScript, so they are fully executed by the server. In case the function is used while taking a survey, the function will be executed only when the respondent moves ahead in the survey.
このプラグインは[[ExpressionManagerStart/ja]]プラグインを使用し、この関数を作成します。この2つの関数はJavaScriptは使用しておらず、完全にサーバで実行されます。アンケート実施中にこの関数を使用する場合、関数はアンケート参加者がアンケートを進めたときのみ実行されます。


{{Alert|これらの関数を使用する前に、[[Plugin_manager/ja#.E6.A6.82.E8.A6.81|プラグインマネージャー]]でプラグインを有効にする必要があります。}}
{{Alert|これらの関数を使用する前に、[[Plugin_manager/ja#.E6.A6.82.E8.A6.81|プラグインマネージャー]]でプラグインを有効にする必要があります。}}

Revision as of 14:21, 28 November 2022

 Hint: この機能は、バージョン5.X.Y以降で使用できます。


使い方

ExpressionScriptエンジンが日付変数を処理するための関数:

  • localize_date(date[, language = null]): Formats a date according to the Survey's date format for the specified language.
    • The date given should follow the following format "Y-m-d H:i:s", which is for example the one used by the TOKEN:VALIDFROM variable.
    • The language used for localization defaults to current session language. If the current language is not configured in the survey, the survey base language will be used. When using in email templates, please use the token language as parameter as to set the expected language. Example: TOKEN:LANGUAGE

このプラグインはExpressionManagerStart/jaプラグインを使用し、この関数を作成します。この2つの関数はJavaScriptは使用しておらず、完全にサーバで実行されます。アンケート実施中にこの関数を使用する場合、関数はアンケート参加者がアンケートを進めたときのみ実行されます。

  これらの関数を使用する前に、プラグインマネージャーでプラグインを有効にする必要があります。


ウェルカムメッセージの使用例

メールテンプレートの使用例