This is essentially the same question: Write a class with language dependent strings. But I didn't find any solutions that worked.

I'm trying to create a package where languages are package options, like so:


}        % Gir pakken med nynorsk babel
}           % Gir pakken med bokmål babel
}         % Gives the package with english babel
\DeclareOption*{\PackageWarning{examplepackage}{Unknown ‘\CurrentOption’}} % for unknown input

In a document it would look something like this:


Hello, this is a document

I get this error on the line \usepackage[english]{mypackage} in the document:

LaTeX Error: Unknown option `english' for package `mypackage*. Missing
= inserted for \infum. Missing numer,treated as zero.

and on the line with \begindocument I get this error:

LaTeX error: \RequirePackage or \LoadClass in Options section

So how can I create a multilingual package with language options?

edit: What I try to do is including the babel package in mypackage such that I can write:


instead of:


1 Answer 1


Package options cannot be applied after the package has been loaded, so move \RequirePackage{babel} at the end.

Second, don't use non-ASCII chars (like å).

And third, the name is \PassOptionsToPackage (note the “s”).

  • Thanks! This removed the errors and problems.
    – Vebjorn
    Oct 17, 2019 at 21:15
  • Although package options can’t in general be applied after a package is loaded, in this specific case, \babelprovide can load a language.
    – Davislor
    Oct 17, 2019 at 22:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .