Translations

Version 6 (Alexis Bienvenüe, 11/30/2020 09:07 am)

1 1
h1. Translations
2 1
3 1
Different levels of translation can be considered to use AMC in some particular language. 
4 1
5 1
h2. Add @lang=XX@ package option
6 1
7 1
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).
8 1
These terms are defined in the following part of the style file:
9 1
<pre>
10 1
\def\AMC@loc@draft{DRAFT}
11 1
\def\AMC@loc@message{For your examination, preferably print
12 1
  documents compiled from auto-multiple-choice.}
13 1
\def\AMC@loc@qf#1{\textbf{Question #1:}}
14 1
\def\AMC@loc@q#1#2{\textbf{Question #1} #2}
15 1
\def\AMC@loc@corrected{Corrected}
16 1
\def\AMC@loc@catalog{Catalog}
17 1
\def\AMC@loc@explain{\textit{\textbf{Explanation: }}}
18 1
\def\AMC@loc@none{None of these answers are correct.}
19 1
\def\AMC@loc@question{question}
20 1
\def\AMC@loc@questions{questions}
21 6 Alexis Bienvenüe
\def\AMC@loc@namesurname{Name and surname:}
22 1
</pre>
23 1
You can find already available languages in the lines behind, for example for French:
24 1
<pre>
25 1
\def\AMC@loc@FR{
26 1
  \def\AMC@loc@draft{PROJET}
27 1
  \def\AMC@loc@message{Pour votre examen, imprimez de pr\'ef\'erence
28 1
    les documents compil\'es \`a l'aide de auto-multiple-choice.}
29 1
  \def\AMC@loc@qf##1{\textbf{Question ##1 :}}
30 1
  \def\AMC@loc@q##1##2{\textbf{Question ##1} ##2}
31 1
  \def\AMC@loc@corrected{Correction}
32 1
  \def\AMC@loc@catalog{Catalogue}
33 1
  \def\AMC@loc@explain{\textit{\textbf{Explication : }}}
34 1
  \def\AMC@loc@none{Aucune de ces r\'eponses n'est correcte.}
35 1
  \def\AMC@loc@question{question}
36 1
  \def\AMC@loc@questions{questions}
37 6 Alexis Bienvenüe
  \def\AMC@loc@namesurname{Nom et pr\'enom :}
38 1
}
39 1
</pre>
40 1
41 5 Alexis Bienvenüe
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/).
42 1
43 1
h2. Graphical User Interface translation
44 2 Alexis Bienvenüe
45 5 Alexis Bienvenüe
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).
46 1
47 1
h2. Documentation