diff --git a/dictionary.sty b/dictionary.sty index 0d612d7..72e678e 100644 --- a/dictionary.sty +++ b/dictionary.sty @@ -13,6 +13,11 @@ \PassOptionsToPackage{\@dictionary@primary,\@dictionary@secondary}{babel} +\newcommand{\previouslang}{\languagename} +%% \newcommand{\selectpreviouslang}{\selectlanguage{\languagename}} + +\newcommand{\debugDictionary}{primary: \@dictionary@primary, secondary: \@dictionary@secondary, previous: \previouslang} + \newcommand{\entry}[2]{% \DTLnewrow{dictionary}% \DTLnewdbentry{dictionary}{word}{#1}% @@ -22,9 +27,14 @@ \newenvironment{dictionary}{% \DTLifdbexists{dictionary}{\DTLcleardb{dictionary}}{\DTLnewdb{dictionary}}% }{% + \renewcommand{\previouslang}{\languagename} +%% \renewcommand{\selectpreviouslang}{\selectlanguage{\languagename}} \DTLsort{word}{dictionary}% \scriptsize% \DTLforeach*{dictionary}{\word=word,\translation=translation}{% \selectlanguage{\@dictionary@primary}\textbf{\word:} \selectlanguage{\@dictionary@secondary}\translation\\}% - \selectlanguage{\@dictionary@primary}% +%% \selectlanguage{vietnamese}\textbf{\word:} \selectlanguage{naustrian}\translation\\}% + \selectlanguage{\@dictionary@primary}% + %% \selectlanguage{\previouslang}% +%% \selectpreviouslang }