Translations

Version 6 (Alexis Bienvenüe, 11/30/2020 09:07 am) → Version 7/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}
\def\AMC@loc@namesurname{Name and surname:}
</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}
\def\AMC@loc@namesurname{Nom et pr\'enom :}
}
</pre>

You can find currently supported languages in the "development code":https://gitlab.com/jojo_boulix/auto-multiple-choice/-/blob/master/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 https://www.auto-multiple-choice.net/).

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. You can 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 "merge request":https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html on the "git repository":https://gitlab.com/jojo_boulix/auto-multiple-choice/ (the PO files are in @I18N/lang@ directory).

h2. Documentation

User documentation is written in the @auto-multiple-choice.LANG.in.xml@ files in the "git repository":https://gitlab.com/jojo_boulix/auto-multiple-choice/-/tree/master/doc. You can start from the English or French one, or write your own document. These docbook files can be edited with a XML editor, or a text editor.