Commit e085bfd7 authored by Jens Dieskau's avatar Jens Dieskau
Browse files

Multi language support

parent 30ec79a6
Pipeline #341 passed with stages
in 3 minutes and 26 seconds
......@@ -8,7 +8,15 @@ function getjsonfile(file)
return s
end
jsoncv = utilities.json.tolua(getjsonfile('metadata/de/cv.json'))
jsoncv = utilities.json.tolua(getjsonfile('metadata/' .. (os.getenv("JDCV_LANG") or "de") .. '/cv.json'))
jsonlang = utilities.json.tolua(getjsonfile('metadata/' .. (os.getenv("JDCV_LANG") or "de") .. '/lang.json'))
function i18n(s)
tex.print(jsonlang[s])
end
function printEntry(a, b)
......@@ -102,7 +110,7 @@ function cveducation()
if entry['area'] ~= nil then
tex.print([[ \vspace{-\topsep}\begin{itemize}[nosep, leftmargin=10pt] ]])
tex.print(string.format([[ \item Studiengang: %s ]], entry['area']))
tex.print(string.format([[ \item %s: %s ]], jsonlang["study_type"], entry['area']))
tex.print(string.format([[ \item Thesis: \href{%s}{\glqq %s\grqq{}} ]], entry['thesis-url'], entry['thesis']))
tex.print([[ \end{itemize} ]] )
end
......@@ -140,4 +148,4 @@ function cvprojects()
tex.print(string.format([[ }{%s} ]], date))
end
end
\ No newline at end of file
end
......@@ -53,6 +53,7 @@
\usepackage[T1]{fontenc}
\fi
\usepackage{ucs}
\usepackage[ngerman]{babel}
......@@ -140,8 +141,8 @@
%\cvlogopic{pics/logo_txt.png}
% NOTE: ordering in sidebar will mimic the following order
\cvaddress{Magdeburg, Deutschland}
\cvbirthday{15. September 1988}
\cvaddress{\luadirect{tex.print(jsoncv['basics']['location']['city'])}, \luadirect{tex.print(jsoncv['basics']['location']['country'])}}
\cvbirthday{\luadirect{tex.print(jsoncv['basics']['birthday'])}}
\cvsite{\luadirect{tex.print(jsoncv['basics']['website'])}}
\cvmail{\luadirect{tex.print(jsoncv['basics']['email'])}}
% pgp key
......@@ -171,10 +172,10 @@
\addtofrontsidebar{
\graphicspath{{pics/flags/shiny/}}
\sidesection{Sprachen}
\sidesection{\MakeUppercase{\luadirect{i18n('languages')}}}
\luadirect{languages()}
\sidesection{Programmiersprachen}
\sidesection{\MakeUppercase{\luadirect{i18n('programming')}}}
\luadirect{programmingLanguages()}
......@@ -222,7 +223,7 @@
\end{icontable}
\vspace*{-0.5em}
\cvsection{ÜBER MICH}
\cvsection{\MakeUppercase{\luadirect{i18n('about_me')}}}
\aboutme{
\luadirect{printEntry('basics', 'summary')}
}
......@@ -231,14 +232,14 @@
% BERUFSERFAHRUNG
%------------------------
%py:beg
\cvsection{BERUFSERFAHRUNG}
\cvsection{\MakeUppercase{\luadirect{i18n('work_experience')}}}
\begin{cvtable}[1.5]
\luadirect{cvitems("work")}
\end{cvtable}
\vspace{-1.8em}
\cvsubsection{Freiberuflich}
\cvsubsection{\luadirect{i18n('freelance')}}
\begin{cvtable}[1.5]
\luadirect{cvitems("freelance", 0, 2)}
\end{cvtable}
......@@ -255,21 +256,22 @@
% BILDUNGSWEG
%--------------------
\vspace{-2.0em}
\cvsection{BILDUNGSWEG}
\cvsection{\MakeUppercase{\luadirect{i18n('education')}}}
\begin{cvtable}[1.5]
\luadirect{cveducation()}
\end{cvtable}
\cvsection{AUSGEWÄHLTE PROJEKTE}%py:ignore
\cvsection{\MakeUppercase{\luadirect{i18n('selected_projects')}}}%py:ignore
\begin{cvtable}
\luadirect{cvprojects()}
\end{cvtable}
%\cvsignature
\vspace*{1.61em}
\vspace*{\fill}
\begin{center}
Source Code @ \href{https://git.jdsoft.de/cv/cv-latex}{https://git.jdsoft.de/cv/cv-latex}
\end{center}
......
Subproject commit ed15788d10b7db5ca86e4c1bae03834af960b6df
Subproject commit 18eac1a0e07420623b47e4370292b1d50dcd54f9
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment