Actions

Multilingual survey/ja: Difference between revisions

From LimeSurvey Manual

(Created page with "多言語アンケート")
 
No edit summary
 
(69 intermediate revisions by 3 users not shown)
Line 4: Line 4:




=Introduction=
=はじめに=




LimeSurvey contains a built-in facility that enables quick and easy translation of surveys. This facility is designed to make it easy for a human translator to translate a survey from the base language into any specified target language.
LimeSurveyには、アンケートを迅速かつ手軽に翻訳できる組み込み機能があります。この機能は、アンケートを基本言語から指定された言語に簡単に翻訳できるように設計されています。


This wiki section quickly covers how a multilingual survey can be created. The guide covers topics such as:
このウィキセクションでは、多言語アンケートを作成する方法について簡単に説明します。このガイドでは、次のトピックについて説明しています。


* [[Multilingual survey#Adding additional languages|the addition of a second language]]
* [[Multilingual survey/ja#.E8.A8.80.E8.AA.9E.E3.82.92.E8.BF.BD.E5.8A.A0.E3.81.99.E3.82.8B|第2言語の追加]]


* [[Multilingual survey#Translating strings|string translation]]
* [[Multilingual survey/ja#.E6.96.87.E5.AD.97.E5.88.97.E3.81.AE.E7.BF.BB.E8.A8.B3|文字列の翻訳]]


* [[Multilingual survey#Quick-translation tool|quick-translation tool]]
* [[Multilingual survey/ja#.E3.82.AF.E3.82.A4.E3.83.83.E3.82.AF.E7.BF.BB.E8.A8.B3.E3.83.84.E3.83.BC.E3.83.AB|クイック翻訳ツール]]


* [[Multilingual survey#Multilingual survey overview|multilingual survey overview]]
* [[Multilingual survey/ja#.E5.A4.9A.E8.A8.80.E8.AA.9E.E3.82.A2.E3.83.B3.E3.82.B1.E3.83.BC.E3.83.88.E3.81.AE.E6.A6.82.E8.A6.81|多言語アンケートの概要]]




The example analysed throughout the wiki section can be downloaded from here: [[Media:Ls3 sample survey multilingual fr de en it.zip|LS3 multilingual survey sample]]. Unzip it and [[Surveys_-_introduction#Import_a_survey|import]] the .lss file into your LimeSurvey instance.
ウィキセクション全体で紹介した例は、ここからダウンロードできます。[[Media:Ls3 sample survey multilingual fr de en it.zip|LS3 多言語アンケートサンプル]]。それを解凍し、.lssファイルをLimeSurveyに[[Surveys_-_introduction/ja#.E3.82.A2.E3.83.B3.E3.82.B1.E3.83.BC.E3.83.88.E3.82.92.E3.82.A4.E3.83.B3.E3.83.9D.E3.83.BC.E3.83.88.E3.81.99.E3.82.8B|インポート]]します。




==Adding additional languages==
==言語を追加する==




The default language of the survey is the one you selected in the [[General_settings#Base_language|base language field]]. By default, it is the language configured in the [[Global_settings#Language|global settings]] of your instance.
アンケートの既定の言語は、[[General_settings/ja#Base_language|基本言語設定]]で選択したものです。既定では、LimeSurveyの[[Global_settings/ja#.E8.A8.80.E8.AA.9E|全体設定]]で指定されている言語となります。


To check which language is the base one, access the [[General settings|general survey settings panel]] and look for the base language field. In our example, the base language is "English". To start adding new languages in which you wish to translate the survey into, see the additional languages field. In our example, four other languages have been selected: French, German, and Italian
どの言語が基本言語であるかは、[[General settings/ja|アンケート一般設定パネル]]にアクセスし、基本言語フィールドで確認します。この例では、基本言語は"英語"です。アンケートで翻訳する言語を新たに追加するには、追加言語フィールドを確認してください。この例では、基本言語の他に、フランス語、ドイツ語、イタリア語の3つの言語が選択されています。




Line 34: Line 34:




Once done, do not forget to click on the '''"Save"''' button located in the upper right side of the screen.
完了したら、画面の右上にある'''"保存"'''ボタンをクリックしてください。


Now, if you check the top toolbar, you can observe that a small arrow appeared next to "Preview survey". This means that the survey can be previewed in four different languages:
一番上のツールバーの"アンケートプレビュー"の隣に小さい矢印があります。この例では、アンケートがそれぞれの言語でプレビューできることがわかります。




Line 42: Line 42:




If you access the [[Overview#Introduction|overview]] panel, four extra survey links are displayed. They correspond to the recently added languages:
[[Overview/ja#.E3.81.AF.E3.81.98.E3.82.81.E3.81.AB|概要]]パネルにアクセスすると、4つのアンケートリンクが表示されます。これらは先ほど追加した言語に対応します。




<center>[[File:Multilingual survey - four links.png]]</center>
<center>[[File:Multilingual survey - four links.png]]</center>


==文字列の翻訳==


==Translating strings==


 
文字列の翻訳を開始するには、それぞれの質問のエディターパネルにアクセスしてください。以下のスクリーンショットでは、質問コードフィールドの上に3つの追加言語が表示されていることがわかります。
To start translating strings, access the editor panel of each of your question. You can observe in the below screenshot that three additional languages are displayed above the question code field:




Line 57: Line 56:




Click on any of them and start translating the question field.
このうちのどれかをクリックして、質問欄を翻訳してください。


The same type of "language bar" is located in many other places such as in the text elements and data policy settings panels, answer and subquestion text fields, and so on. However, translating fields using this method can get tricky if your survey is long and you wish not to miss anything. That is why we heavily recommend our users to use the quick translation tool. To access it, click on any survey-related setting (such as "Overview") -> [[Tools]] -> [[Quick-translation]]
同じタイプの"言語バー"が、テキスト要素やデータポリシー設定パネル、回答、質問テキストフィールドなど、他の多くの場所にあります。ただし、この方法を使用してフィールドを翻訳する場合、アンケートが長いと翻訳漏れが起こらないよう見逃さないよう注意が必要です。そのため、クイック翻訳ツールの使用を強く推奨しています。ツールにアクセスするには、アンケート関連の設定("概要"など)から、[[Tools/ja|ツール]] -> [[Quick-translation/ja|クイック翻訳]]をクリックしてください。




Line 65: Line 64:




===Quick-translation tool===
===クイック翻訳ツール===




The quick-translation tool has been specifically designed for those that work with multilingual surveys. Once accessed, the following panel will be loaded:
クイック翻訳ツールは、多言語アンケートに関わる人のために特別に設計されています。アクセスすると、次のパネルが読み込まれます。




Line 74: Line 73:




The first option, '''translate to''', gives you the possibility to select the language you wish to translate into from your base language.
最初のオプションでは、基本言語から翻訳したい言語を選択します。


The next options refer to the translation of your survey content. They refer to:
次のオプションでは、翻訳するアンケートのコンテンツを選択します。


*[[Text_elements#Survey_title|Survey title]] and [[Text_elements#Description|description]]
*[[Text_elements/ja#Survey_title|アンケートのタイトル]][[Text_elements/ja#Description|内容説明]]
*[[Text_elements#Welcome_message|Welcome and end texts]]
*[[Text_elements/ja#Welcome_message|ようこそメッセージと終了メッセージ]]
*[[Question groups - introduction|Question groups]]
*[[Question groups - introduction/ja|質問グループ]]
*[[Questions - introduction|Questions]]
*[[Questions - introduction/ja|質問]]
*[[Adding_answers_or_subquestions#Specific_for_subquestions|Subquestions]]
*[[Adding_answers_or_subquestions/ja#.E3.82.B5.E3.83.96.E8.B3.AA.E5.95.8F.E3.81.AB.E9.96.A2.E3.81.99.E3.82.8B.E4.BA.8B.E9.A0.85|サブ質問]]
*[[Adding_answers_or_subquestions#Specific_for_Answers|Answer options]]
*[[Adding_answers_or_subquestions/ja#.E5.9B.9E.E7.AD.94.E3.81.AB.E9.96.A2.E3.81.99.E3.82.8B.E4.BA.8B.E9.A0.85|回答オプション]]
*[[Email_templates#Invitation|Invitation email subject]]
*[[Email_templates/ja#.E6.A1.88.E5.86.85|案内メール件名]]
*[[Email_templates#Reminder|Reminder email subject]]
*[[Email_templates/ja#.E5.82.AC.E4.BF.83|催促メール件名]]
*[[Email_templates#Confirmation|Confirmation email subject]]
*[[Email_templates/ja#.E7.A2.BA.E8.AA.8D|確認メール件名]]
*[[Email_templates#Registration|Registration email subject]]
*[[Email_templates/ja#.E7.99.BB.E9.8C.B2|参加登録メール件名]]


{{Note|Please note that at the moment of writing this section (LimeSurvey 3.16.0), the following sections are translatable but not displayed in this panel:
{{Note|この節を書いている時点で(LimeSurvey 3.16.0)、次の節は翻訳可能ですがこのパネルには表示されません。


*[[Data policy settings|Data policy text]]
*[[Data policy settings/ja|データポリシーのテキスト]]
*[[Assessments|Assessment text]]
*[[Assessments/ja|評価のテキスト]]
*[[Survey quotas|Quota text]]
*[[Survey quotas/ja|クォータのテキスト]]


To translate them, please access each option and follow the steps described in the previous wiki subsection.}}
これらを翻訳するには、各オプションにアクセスし、前のウィキサブセクションで説明されている手順に従ってください。}}




Once you are done translating these fields, do not forget to click on the '''"Save"''' button located in the upper right part of the panel.
フィールドの翻訳が終わったら、パネルの右上にある'''"保存"'''ボタンを忘れずにクリックしてください。




==Multilingual survey overview==
==多言語アンケートの概要==




To check your work, use the preview button. The welcome page will look like this:
結果を確認するには、プレビューボタンを使用してください。ようこそページは次のようになります。




Line 110: Line 109:




Two language switcher can be observed once the welcome page is loaded. LimeSurvey offers the possibility to your respondents to change the language of instructions even though you shared with them the corresponding link for a specific language. A language switcher will also be located on the top right-side of your survey.
ようこそページが読み込まれると、2つの言語スイッチが表示されます。ここで、回答者は回答者に共有されたURLの言語と異なる言語に変更することができます。言語スイッチもアンケートの右上にあります。


In the case in which you wish to hide the two "language switcher" buttons, edit the theme of your survey. For more details, see the [[Multilingual survey#Hints & tips|hints & tips wiki subsection]].
2つの"言語スイッチ"ボタンを表示させたくない場合は、アンケートのテンプレートを編集してください。詳しくは[[Multilingual survey/ja#.E3.83.92.E3.83.B3.E3.83.88.E3.81.A8TIP|ヒントとTIPのウィキサブセクション]]をご覧ください。




{{Note|In the case in which a string is not translated, the respective string will be displayed in the base language of your survey.}}
{{Note|翻訳されていない文字列がある場合、その文字列はアンケートの基本言語で表示されます。}}




=Hints & tips=
=ヒントとTIP=




* If you wish to grant users translation permissions to access the quick-translation tool, check the following [[Quick-translation#Requirements|wiki subsection]].
* クイック翻訳ツールにアクセスするための翻訳権限をユーザに付与したい場合は、次の[[Quick-translation/ja#.E8.A6.81.E4.BB.B6|ウィキサブセクション]]をチェックしてください。


* The "Auto-translate" feature makes use of the Google translate web service for automatic translation of a survey. You must enter your Google Translate API Key under global settings to access this feature. Google currently charges $20 US per 1 million characters submitted for translation.
* "自動翻訳"機能では、アンケートの自動翻訳にGoogleの翻訳Webサービスを利用します。この機能にアクセスするには、全般設定でGoogle Translate APIキーを入力する必要があります。Googleは現在、100万文字を翻訳するごとに20米ドルを請求しています。




==How to hide the language switcher from the welcome page==
==ようこそページから言語スイッチを隠す方法==




In the case in which you decide to launch a multilingual survey, you will observe on the welcome page a drop-down menu that permits your respondents to select the language in which they wish to fill in your survey:
多言語アンケートを開始する際、ようこそページに回答を記入する言語を選択できるドロップダウンメニューが表示されます。




Line 135: Line 134:
   
   


However, in certain scenarios you wish to hide the respective option. There are many ways in which you can hide the language switcher. The '''"twig"''' way is displayed below.
ただし、これを非表示にしたい場合があるかもしれません。言語スイッチを非表示にする方法はたくさんあります。以下、'''"小技"'''を紹介します。


Access [[Themes]] from the global [[Administering LimeSurvey|Configuration menu]]:
全体の[[Administering LimeSurvey/ja|設定メニュー]]から[[Themes/ja|テンプレート]]を選択します。




Line 143: Line 142:




Click on the '''Theme editor''' button to edit the desired theme:
テンプレートを編集するには、'''テンプレートエディター'''をクリックしてください。




Line 149: Line 148:




{{Note|LimeSurvey does not allow you to edit the standard themes! If you wish to add changes to a standard theme, click on the '''Extend''' button located on the top bar to create an editable copy of it.}}
{{Note|LimeSurveyでは、標準のテンプレートを編集することはできません。 標準テーマに変更を加えたい場合は、トップバーにある'''拡張'''ボタンをクリックして編集可能なコピーを作成してください。}}




Look on the left side of the screen for the '''language_changer.twig''' file.
画面の左側にある'''language_changer.twig'''ファイルを確認してください。




Line 158: Line 157:




Go to the line that contains the following function:
次の関数を含む行に移動します。


<syntaxhighlight lang="php" enclose="div">
<syntaxhighlight lang="php">
{% if aSurveyInfo.alanguageChanger.show == true %}
{% if aSurveyInfo.alanguageChanger.show == true %}
</syntaxhighlight>
</syntaxhighlight>


Comment it out (replace "%" with "#") and copy the following line below it:
コメントアウトし( "%""#"に置換)、その下に次の行をコピーします。


<syntaxhighlight lang="php" enclose="div">
<syntaxhighlight lang="php">
{% if false == true %}
{% if false == true %}
</syntaxhighlight>
</syntaxhighlight>




The line should look like this in the end:
修正後は次のようになります。




Line 177: Line 176:




Click on "Copy to local theme and save changes".
"ローカルテンプレートをコピーして変更を保存"をクリックしてください。




Access your survey and select the edited theme from the [[General settings|general settings]] panel. Now, the welcome page should look like this:
アンケートにアクセスし、[[General settings/ja|一般設定]]パネルから編集したテンプレートを選択してください。 これで、ようこそページは次のようになります。




Line 186: Line 185:




==How to hide the language switcher located on the top menu==
==トップメニューにある言語スイッチを隠す方法==




To hide the top language switcher, we will follow pretty much the same steps as described above. We just have to access the right twig file to edit it. Access again the theme you wish to change, and then go to '''Screen''' which is located in the upper-right part of the window and select '''Navigation''' from the dropdown list. Now, look on the left side of the window for "language_changer_top_menu.twig". Click on it and comment out:
トップ言語スイッチを隠すには、上で説明したのとほぼ同じ手順に従います。正しいtwigファイルにアクセスして編集します。変更したいテンプレートに再度アクセスし、ウィンドウの右上にある'''画面'''に移動し、ドロップダウンリストから'''ナビゲーション'''を選択します。ウィンドウの左側で"language_changer_top_menu.twig"を探し、クリックしてコメントアウトしてください。


<syntaxhighlight lang="php" enclose="div">
<syntaxhighlight lang="php">
{% if aSurveyInfo.alanguageChanger.show == true %}
{% if aSurveyInfo.alanguageChanger.show == true %}
</syntaxhighlight>
</syntaxhighlight>


Add the following line below it:
その下に次の行を追加します。


<syntaxhighlight lang="php" enclose="div">
<syntaxhighlight lang="php">
{% if false == true %}
{% if false == true %}
</syntaxhighlight>
</syntaxhighlight>


No language switcher will be displayed on the right side of the screen:
画面の右側に言語スイッチが表示されなくなります。




<center>[[File:Language switcher hide top menu.png]]</center>
<center>[[File:Language switcher hide top menu.png]]</center>

Latest revision as of 02:26, 19 February 2022


はじめに

LimeSurveyには、アンケートを迅速かつ手軽に翻訳できる組み込み機能があります。この機能は、アンケートを基本言語から指定された言語に簡単に翻訳できるように設計されています。

このウィキセクションでは、多言語アンケートを作成する方法について簡単に説明します。このガイドでは、次のトピックについて説明しています。


ウィキセクション全体で紹介した例は、ここからダウンロードできます。LS3 多言語アンケートサンプル。それを解凍し、.lssファイルをLimeSurveyにインポートします。


言語を追加する

アンケートの既定の言語は、基本言語設定で選択したものです。既定では、LimeSurveyの全体設定で指定されている言語となります。

どの言語が基本言語であるかは、アンケート一般設定パネルにアクセスし、基本言語フィールドで確認します。この例では、基本言語は"英語"です。アンケートで翻訳する言語を新たに追加するには、追加言語フィールドを確認してください。この例では、基本言語の他に、フランス語、ドイツ語、イタリア語の3つの言語が選択されています。



完了したら、画面の右上にある"保存"ボタンをクリックしてください。

一番上のツールバーの"アンケートプレビュー"の隣に小さい矢印があります。この例では、アンケートがそれぞれの言語でプレビューできることがわかります。



概要パネルにアクセスすると、4つのアンケートリンクが表示されます。これらは先ほど追加した言語に対応します。


文字列の翻訳

文字列の翻訳を開始するには、それぞれの質問のエディターパネルにアクセスしてください。以下のスクリーンショットでは、質問コードフィールドの上に3つの追加言語が表示されていることがわかります。



このうちのどれかをクリックして、質問欄を翻訳してください。

同じタイプの"言語バー"が、テキスト要素やデータポリシー設定パネル、回答、質問テキストフィールドなど、他の多くの場所にあります。ただし、この方法を使用してフィールドを翻訳する場合、アンケートが長いと翻訳漏れが起こらないよう見逃さないよう注意が必要です。そのため、クイック翻訳ツールの使用を強く推奨しています。ツールにアクセスするには、アンケート関連の設定("概要"など)から、ツール -> クイック翻訳をクリックしてください。



クイック翻訳ツール

クイック翻訳ツールは、多言語アンケートに関わる人のために特別に設計されています。アクセスすると、次のパネルが読み込まれます。



最初のオプションでは、基本言語から翻訳したい言語を選択します。

次のオプションでは、翻訳するアンケートのコンテンツを選択します。

この節を書いている時点で(LimeSurvey 3.16.0)、次の節は翻訳可能ですがこのパネルには表示されません。 これらを翻訳するには、各オプションにアクセスし、前のウィキサブセクションで説明されている手順に従ってください。


フィールドの翻訳が終わったら、パネルの右上にある"保存"ボタンを忘れずにクリックしてください。


多言語アンケートの概要

結果を確認するには、プレビューボタンを使用してください。ようこそページは次のようになります。



ようこそページが読み込まれると、2つの言語スイッチが表示されます。ここで、回答者は回答者に共有されたURLの言語と異なる言語に変更することができます。言語スイッチもアンケートの右上にあります。

2つの"言語スイッチ"ボタンを表示させたくない場合は、アンケートのテンプレートを編集してください。詳しくはヒントとTIPのウィキサブセクションをご覧ください。


翻訳されていない文字列がある場合、その文字列はアンケートの基本言語で表示されます。


ヒントとTIP

  • クイック翻訳ツールにアクセスするための翻訳権限をユーザに付与したい場合は、次のウィキサブセクションをチェックしてください。
  • "自動翻訳"機能では、アンケートの自動翻訳にGoogleの翻訳Webサービスを利用します。この機能にアクセスするには、全般設定でGoogle Translate APIキーを入力する必要があります。Googleは現在、100万文字を翻訳するごとに20米ドルを請求しています。


ようこそページから言語スイッチを隠す方法

多言語アンケートを開始する際、ようこそページに回答を記入する言語を選択できるドロップダウンメニューが表示されます。



ただし、これを非表示にしたい場合があるかもしれません。言語スイッチを非表示にする方法はたくさんあります。以下、"小技"を紹介します。

全体の設定メニューからテンプレートを選択します。



テンプレートを編集するには、テンプレートエディターをクリックしてください。



LimeSurveyでは、標準のテンプレートを編集することはできません。 標準テーマに変更を加えたい場合は、トップバーにある拡張ボタンをクリックして編集可能なコピーを作成してください。


画面の左側にあるlanguage_changer.twigファイルを確認してください。



次の関数を含む行に移動します。

{% if aSurveyInfo.alanguageChanger.show == true %}

コメントアウトし( "%"を"#"に置換)、その下に次の行をコピーします。

{% if false == true %}


修正後は次のようになります。



"ローカルテンプレートをコピーして変更を保存"をクリックしてください。


アンケートにアクセスし、一般設定パネルから編集したテンプレートを選択してください。 これで、ようこそページは次のようになります。



トップメニューにある言語スイッチを隠す方法

トップ言語スイッチを隠すには、上で説明したのとほぼ同じ手順に従います。正しいtwigファイルにアクセスして編集します。変更したいテンプレートに再度アクセスし、ウィンドウの右上にある画面に移動し、ドロップダウンリストからナビゲーションを選択します。ウィンドウの左側で"language_changer_top_menu.twig"を探し、クリックしてコメントアウトしてください。

{% if aSurveyInfo.alanguageChanger.show == true %}

その下に次の行を追加します。

{% if false == true %}

画面の右側に言語スイッチが表示されなくなります。