version 1.3, 2014/04/24 13:02:26
|
version 1.4, 2014/04/24 13:18:16
|
Line 1
|
Line 1
|
\label{Authoring_Multilingual_Problems} |
\label{Authoring_Multilingual_Problems} |
\textbf{How to write problems in different languages?} |
\section*{How to write problems in different languages?} |
|
|
LON-CAPA offers the optional possibility to create multilingual problems. |
LON-CAPA offers the optional possibility to create multilingual problems. |
You can use different languages for the task text and also for the options and |
You can use different languages for the task text and also for the options and |
Line 7 all other texts shown to the student. LO
|
Line 7 all other texts shown to the student. LO
|
fitting language for the texts to show to your students. |
fitting language for the texts to show to your students. |
|
|
|
|
\textbf{Problem Template} |
\subsection*{Problem Template} |
|
|
A good point to start is to select the template \textbf{Option Response - |
A good point to start is to select the template \textbf{Option Response - |
Matching (multilingual)} when creating a new problem. You can see there how |
Matching (multilingual)} when creating a new problem. You can see there how |
Line 16 to show texts and options in an optionre
|
Line 16 to show texts and options in an optionre
|
write such problems as follows. |
write such problems as follows. |
|
|
|
|
\textbf{Different languages in a text block} |
\subsection*{Different languages in a text block} |
|
|
Text to show to students is surrounded by <startouttext /> and <endouttext>. |
Text to show to students is surrounded by <startouttext /> and <endouttext>. |
If you use only one language, just type your text within these tags: |
If you use only one language, just type your text within these tags: |
Line 58 out to extend all <translated> tags with
|
Line 58 out to extend all <translated> tags with
|
consistent language for all texts in the problem. |
consistent language for all texts in the problem. |
|
|
|
|
\textbf{Different languages in options, variables, etc.} |
\subsection*{Different languages in options, variables, etc.} |
|
|
If you use a script block to create dynamic content and it contains text, the |
If you use a script block to create dynamic content and it contains text, the |
\textbf{\&languages()} function is used to offer these texts in different |
\textbf{\&languages()} function is used to offer these texts in different |
Line 84 if ($bestlanguage eq 'de') {
|
Line 84 if ($bestlanguage eq 'de') {
|
\end{verbatim} |
\end{verbatim} |
|
|
|
|
\textbf{Interface language vs. problem language} |
\subsection*{Interface language vs. problem language} |
|
|
LON-CAPA supports various languages for the web interface, e.g. for menu items |
LON-CAPA supports various languages for the web interface, e.g. for menu items |
and help files. These languages are not necessarily dependent on the languages |
and help files. These languages are not necessarily dependent on the languages |
Line 94 preference is considered when the interf
|
Line 94 preference is considered when the interf
|
fitting language for texts in a problem is chosen. Details see below. |
fitting language for texts in a problem is chosen. Details see below. |
|
|
|
|
\textbf{Language Codes} |
\subsection*{Language Codes} |
|
|
Some language codes which can be used in the <lang> tag within the <translated> |
Some language codes which can be used in the <lang> tag within the <translated> |
tag: |
tag: |
Line 118 Language \ref{Prefs_Language} in the Use
|
Line 118 Language \ref{Prefs_Language} in the Use
|
You can use other languages in your problems. |
You can use other languages in your problems. |
|
|
|
|
\textbf{Consistent language with <translated> and \&languages()} |
\subsection*{Consistent language with <translated> and \&languages()} |
|
|
If you use both, <translated> and \&languages(), in your problem, always make |
If you use both, <translated> and \&languages(), in your problem, always make |
sure to keep the languages synchronized. Use exactly the same language codes |
sure to keep the languages synchronized. Use exactly the same language codes |
for the \&languages() call like those used in the <lang> tags within |
for the \&languages() call like those used in the <lang> tags within |
<translated>. |
<translated>. |
|
|
\textbf{Testing multilingual problems} |
|
|
\subsection*{Testing multilingual problems} |
|
|
You can temporarily change the language for a problem in the \emph{Problem |
You can temporarily change the language for a problem in the \emph{Problem |
Testing} screen. Use the ``Language'' dropdown list to choose the language |
Testing} screen. Use the ``Language'' dropdown list to choose the language |
Line 135 Note: Your own personal settings apply,
|
Line 136 Note: Your own personal settings apply,
|
below). |
below). |
|
|
|
|
\textbf{Language hierarchy model in LON-CAPA} |
\subsection*{Language hierarchy model in LON-CAPA} |
|
|
LON-CAPA uses the best fitting language by considering the following settings |
LON-CAPA uses the best fitting language by considering the following settings |
(if available), in the order as follows: |
(if available), in the order as follows: |
Line 170 is German.
|
Line 171 is German.
|
LON-CAPA shows this problem in German to the student. |
LON-CAPA shows this problem in German to the student. |
|
|
|
|
\textbf{Legacy code with <languageblock>} |
\subsection*{Legacy code with <languageblock>} |
|
|
Some old problems might contain the \textbf{<languageblock>} tag. This tag is |
Some old problems might contain the \textbf{<languageblock>} tag. This tag is |
deprecated and it is discouraged to use it. The functionality is different to |
deprecated and it is discouraged to use it. The functionality is different to |