I am building a fairly complex letter template as article-extending class, which needs to be able to understand two languages (English and German). This is implemented via babel (with both ngerman and english as package options) and \DeclareOption, which uses \selectlanguage to determine which one.

Currently, I use datetime and \today to set the date, but that requires to load babel BEFORE datetime (source). What is the correct way to do this?

I could imagine the following, but don't know how to do any of these:

  • reload babel so that it updates the dateformat AFTER language option has been processed

  • specifiy the language for datetime (or use another package that supports this)

  • do it manually via ifthenelse (I can do that, but there has to be a more elegant way?)

Thanks for your input!

Minimal Non-Working Example:

\usepackage[english, ngerman]{babel}

% date formatting magic here please %

For the time being, I decided to settle with the following (this thing needs to work after all), but if somebody knows a more elegant solution, I would be happy to hear it!

    }{ % german
    }{ % english

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.