Translations
Version 2 (Alexis Bienvenüe, 11/30/2020 09:07 am) → Version 3/8 (Alexis Bienvenüe, 11/30/2020 09:07 am)
h1. Translations
Different levels of translation can be considered to use AMC in some particular language.
h2. Add @lang=XX@ package option
The LaTeX style file @automultiplechoice.sty@ defines the @lang=XX@ option, that can be used to translate some few terms used in the package (as the word _Question_ written to introduce each question).
These terms are defined in the following part of the style file:
<pre>
\def\AMC@loc@draft{DRAFT}
\def\AMC@loc@message{For your examination, preferably print
documents compiled from auto-multiple-choice.}
\def\AMC@loc@qf#1{\textbf{Question #1:}}
\def\AMC@loc@q#1#2{\textbf{Question #1} #2}
\def\AMC@loc@corrected{Corrected}
\def\AMC@loc@catalog{Catalog}
\def\AMC@loc@explain{\textit{\textbf{Explanation: }}}
\def\AMC@loc@none{None of these answers are correct.}
\def\AMC@loc@question{question}
\def\AMC@loc@questions{questions}
</pre>
You can find already available languages in the lines behind, for example for French:
<pre>
\def\AMC@loc@FR{
\def\AMC@loc@draft{PROJET}
\def\AMC@loc@message{Pour votre examen, imprimez de pr\'ef\'erence
les documents compil\'es \`a l'aide de auto-multiple-choice.}
\def\AMC@loc@qf##1{\textbf{Question ##1 :}}
\def\AMC@loc@q##1##2{\textbf{Question ##1} ##2}
\def\AMC@loc@corrected{Correction}
\def\AMC@loc@catalog{Catalogue}
\def\AMC@loc@explain{\textit{\textbf{Explication : }}}
\def\AMC@loc@none{Aucune de ces r\'eponses n'est correcte.}
\def\AMC@loc@question{question}
\def\AMC@loc@questions{questions}
}
</pre>
You can find currently supported languages in the "development code":https://bitbucket.org/auto-multiple-choice/auto-multiple-choice/src/default/doc/sty/automultiplechoice.dtx.in (look for @\subsection{Localisation}@). If you want to add some new language, or update some translations for some language, the simpler way is to drop a mail to Alexis (see his email in the footer at http://home.gna.org/auto-qcm/).
h2. Graphical User Interface translation
To localize the GUI, you will have to build a PO file for your language, starting from the POT file that contains the strings to be translated. This process can be done online with "transifex":https://www.transifex.com/projects/p/auto-multiple-choice/, but you can also use one of the tools to edit the PO file, such as "poedit":http://poedit.net/. To include your work to the development code, ask for Alexis or make a "pull request":https://confluence.atlassian.com/display/BITBUCKET/Fork+a+Repo%2C+Compare+Code%2C+and+Create+a+Pull+Request on the "mercurial repository":https://bitbucket.org/auto-multiple-choice/auto-multiple-choice (the PO files are in @I18N/lang@ directory).
h2. Documentation
Different levels of translation can be considered to use AMC in some particular language.
h2. Add @lang=XX@ package option
The LaTeX style file @automultiplechoice.sty@ defines the @lang=XX@ option, that can be used to translate some few terms used in the package (as the word _Question_ written to introduce each question).
These terms are defined in the following part of the style file:
<pre>
\def\AMC@loc@draft{DRAFT}
\def\AMC@loc@message{For your examination, preferably print
documents compiled from auto-multiple-choice.}
\def\AMC@loc@qf#1{\textbf{Question #1:}}
\def\AMC@loc@q#1#2{\textbf{Question #1} #2}
\def\AMC@loc@corrected{Corrected}
\def\AMC@loc@catalog{Catalog}
\def\AMC@loc@explain{\textit{\textbf{Explanation: }}}
\def\AMC@loc@none{None of these answers are correct.}
\def\AMC@loc@question{question}
\def\AMC@loc@questions{questions}
</pre>
You can find already available languages in the lines behind, for example for French:
<pre>
\def\AMC@loc@FR{
\def\AMC@loc@draft{PROJET}
\def\AMC@loc@message{Pour votre examen, imprimez de pr\'ef\'erence
les documents compil\'es \`a l'aide de auto-multiple-choice.}
\def\AMC@loc@qf##1{\textbf{Question ##1 :}}
\def\AMC@loc@q##1##2{\textbf{Question ##1} ##2}
\def\AMC@loc@corrected{Correction}
\def\AMC@loc@catalog{Catalogue}
\def\AMC@loc@explain{\textit{\textbf{Explication : }}}
\def\AMC@loc@none{Aucune de ces r\'eponses n'est correcte.}
\def\AMC@loc@question{question}
\def\AMC@loc@questions{questions}
}
</pre>
You can find currently supported languages in the "development code":https://bitbucket.org/auto-multiple-choice/auto-multiple-choice/src/default/doc/sty/automultiplechoice.dtx.in (look for @\subsection{Localisation}@). If you want to add some new language, or update some translations for some language, the simpler way is to drop a mail to Alexis (see his email in the footer at http://home.gna.org/auto-qcm/).
h2. Graphical User Interface translation
To localize the GUI, you will have to build a PO file for your language, starting from the POT file that contains the strings to be translated. This process can be done online with "transifex":https://www.transifex.com/projects/p/auto-multiple-choice/, but you can also use one of the tools to edit the PO file, such as "poedit":http://poedit.net/. To include your work to the development code, ask for Alexis or make a "pull request":https://confluence.atlassian.com/display/BITBUCKET/Fork+a+Repo%2C+Compare+Code%2C+and+Create+a+Pull+Request on the "mercurial repository":https://bitbucket.org/auto-multiple-choice/auto-multiple-choice (the PO files are in @I18N/lang@ directory).
h2. Documentation